transaction - 有关mysql5.6的事务隔离级别
PHP中文网
PHP中文网 2017-04-17 16:37:30
0
1
722

更改数据库默认隔离级别。
在网上查了下可以使用这句:set global transaction isolation level read committed;更改mysql数据库的默认隔离级别,请问,这种隔离级别的设置是全部数据库(或者叫schema)吗?比如我有两个数据库,一个test1,一个test2,我是否可以设置test1的默认隔离级别为Read Commited,而设置test2的默认隔离级别为Repeatable Read?如何实现?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
洪涛

According to the official documentation, it is recommended to set the transaction isolation level in the mysql parameter file. This setting method should be global and has nothing to do with which database.

To set the default isolation level to REPEATABLE READ, use these lines in the [mysqld] section of an option file:
[mysqld]
transaction-isolation = REPEATABLE-READ

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template