1、
- mysql> set autocommit=off;
- Query OK, 0 rows affected (0.00 sec)
- mysql> show variables like ‘autocommit‘;
- +---------------+-------+
- | Variable_name | Value |
- +---------------+-------+
- | autocommit | OFF |
- +---------------+-------+
- 1 row in set (0.00 sec)
2、@@autocommit为0表示off,为1表示on
- mysql> select @@autocommit;
- +--------------+
- | @@autocommit |
- +--------------+
- | 0 |
- +--------------+
- 1 row in set (0.00 sec)
Mysql 关闭自动commit
原文:http://www.cnblogs.com/manzb/p/6547866.html