一、权限
1. 授权
grant [权限] on [库.表] to [用户名]@[IP]
例:grant SYSTEM_VARIABLES_ADMIN on *.* to 'opsdev'@'%'
2. 刷新权限
flush privileges;
二、事务
1. 查询事务变量(不同版本变量名不一样)
show variables like '%transaction%'
2. 查看事务隔离级别(8.0以上)
会话级别
SELECT @@transaction_isolation
系统级别
SELECT @@global.transaction_isolation
3. 设置事务隔离级别
RU (Read Uncommitted)读未提交
RC (Read Committed) 读已提交
RR (Repeatable Read) 可重复读 -- 默认
Serializable 串行化
会话级别
set session transaction ISOLATION level read committed;
系统级别
set global transaction ISOLATION level read committed;
标签:事务,transaction,Read,命令,set,mysql,权限,级别 From: https://www.cnblogs.com/uip001/p/17085074.html