MySQL8修改事务隔离级别

一、全局生效

set global TRANSACTION ISOLATION level read COMMITTED;
show variables like transaction_isolation;

 

二、当前会话生效

set  session TRANSACTION ISOLATION level read COMMITTED;
show variables like transaction_isolation;

三、默认隔离级别

repeatable read

四、事务隔离级别

//设置read uncommitted级别:
set  [ global | session ] transaction isolation level read uncommitted;

//设置read committed级别:
set  [ global | session ]  transaction isolation level read committed;

//设置repeatable read级别:
set  [ global | session ] transaction isolation level repeatable read;

//设置serializable级别:
set  [ global | session ] transaction isolation level serializable;

 



MySQL8修改事务隔离级别

上一篇:《社交网站界面设计(原书第2版)》——3.1 参与


下一篇:Redis千万级的数据量的性能测试