Cannot set autocommit to 0 in my.ini file /(my.cfn file)
-
14-06-2021 - |
Frage
I am using wamp server so my.ini file is the new my.cfn file. I opened the file with an editor and i scrolled down untill i've seen
[mysqld]
after which i have typed
init_connect='SET autocommit=0'
then i have saved the file restarted my wamp server started mySQL concol and entered the command
SELECT @@autocommit;
I got @@autocommit | 1
but to my understanding it should be zero if the autocommit is off.
Anybody understands whats going on??
Lösung
check the answer of this page:
http://bugs.mysql.com/bug.php?id=5035
especially here:
[17 Aug 2004 11:20] Sergey Gluhov Looks like it's not a bug. If a user has SUPER privilege, init_connect will not execute (otherwise if init_connect will a wrong query no one can connect to server).
Note, if init_connect is a wrong query, the connection is closing without any errors and next command will clause 'lost connection' error.
Maybe you're in the same situation?