|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I'd like to make a MySQL user session always be in transactional-mode, i.e. have autocommit OFF always. I've not found a way of doing this - is it possible, or do I just always have to type SET AUTOCOMMIT=0; every time I logon? There doesn't appear to be an option in the config file to set this; neither does there appear to be any way of running a standard script at logon. I'm on Windows - I thought I might be able to pass in a login-file on the command line (using a shortcut) as though running in batch mode, but then it just runs the script and exits straight away! No more ideas. appreciated, Cheers, Clark. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Oct 20, 12:47 pm, Cloink <Cloink_Frigg...@yahoo.com> wrote:
> Hi, > > I'd like to make a MySQL user session always be in transactional-mode, > i.e. have autocommit OFF always. > > I've not found a way of doing this - is it possible, or do I just > always have to type > SET AUTOCOMMIT=0; > every time I logon? > > There doesn't appear to be an option in the config file to set this; > neither does there appear to be any way of running a standard script > at logon. > > I'm on Windows - I thought I might be able to pass in a login-file on > the command line (using a shortcut) as though running in batch mode, > but then it just runs the script and exits straight away! > > No more ideas. > > appreciated, > Cheers, > Clark. According to the manual (which you probably have access to as well) you can set the default behavior by adding this to your my.cnf or my.ini: [mysqld] init_connect='set autocommit=0' |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
ZeldorBlat wrote:
> According to the manual (which you probably have access to as well) Manual, surely you know that our purpose is to look all this stuff up for the lazy posters! |
|
![]() |
| Outils de la discussion | |
|
|