赞
踩
SELECT @@GLOBAL.transaction_isolation;
SELECT @@SESSION.transaction_isolation;
show variables like '%iso%';
READ UNCOMMITTED
READ COMMITTED
(个人推荐使用这个)REPEATABLE READ
(这个是mysql默认的事务隔离级别)SERIALIZABLE
set global transaction isolation level READ COMMITTED;
set session transaction isolation level READ COMMITTED;
直接设置/etc/mysql/my.cnf
或者设置/etc/mysql/conf.d/
下的文件夹,要注意的是,文件夹的权限不能过高或过低,否则会出现忽略conf.d
下的文件夹
[mysqld]
transaction-isolation = REPEATABLE-READ
transaction-isolation = READ-COMMITTED
transaction-isolation = READ-UNCOMMITTED
transaction-isolation = SERIALIZABLE
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。