1.加锁 只读权限

LOCK TABLES tb_city READ;

2.解锁

 UNLOCK TABLES;

 3.查询表锁情况

show OPEN TABLES where In_use > 0;

 

相关文章: