问题描述
我必须将autocommit
设置为false
,并且已经在my.cnf
配置文件中进行了更改.
I have to set autocommit
to false
, and I have done the changes in my.cnf
configuration file.
我已经添加了autocommit=0
来设置globally autocommit OFF
,但是在我的my.cnf
文件中添加了autocommit=0
属性之后,我的sql
服务器没有启动.
I have added autocommit=0
for setting globally autocommit OFF
but after adding autocommit=0
property in my my.cnf
file my sql
server not started.
但是当我评论这个新添加的行时,我的sql server正常启动了.
But when I comment this new added line my sql server started properly.
我正在使用"/etc/init.d/mysql start"
此命令启动sql服务器.
I m starting my sql server with "/etc/init.d/mysql start"
this command.
设置autocommit false
有什么错误吗?
如果是这样,那么任何人都可以告诉我我该怎么做?
If so, then anyone please tell me how I can do that?
请尽快回复我.
谢谢.
推荐答案
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_autocommit
[mysqld]
init_connect='SET autocommit=0'
这篇关于如何全局设置自动提交错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!