一、全局生效
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;