mysql 锁表 解锁的命令

@liubb  December 1, 2017
1.flush tables with read lock
全局 锁定表。只能读,不能写。用于备份数据时或设置主从同步时。
2.lock tables xx with read
读锁,只能读不能写。
3.lock tables xx with read local
该进程只能读。其他进程不影响。
4.lock tables xx with write
该进程能读能写。其他进程只能读。
5.unlock tables
释放锁
6.show full processlist
显示进程

添加新评论