configure in configuration my.cnf file:
[mysqld] autocommit =0
Before 5.5.8, due to mysql has no global variables autocommit
use workaround in my.cnf:
[mysqld ] init_connect='SET autocommit =0'
But the workaround has a limitation , init_connect
SUPER
Below is the original description from Manual book:
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_init_connect
--------------------------------------Clip begin--------------------------------------------------
Command-Line Format | --init-connect=name |
||
Option-File Format | init_connect |
||
Option Sets Variable | Yes, init_connect |
||
Variable Name | init_connect |
||
Variable Scope | |||
Dynamic Variable | |||
Type | string |
autocommit
init_connect
SET GLOBAL init_connect='SET autocommit=0';
init_connect
[mysqld ] init_connect='SET autocommit =0'
init_connect
SUPER
init_connect
init_connect
SUPER
init_connect
--------------------------------------Clip End--------------------------------------------------