**1.共享读锁**
加锁
`lock table 表名 read;`
解锁
`unlock tables`
```
show variables like '%table%';
```
```
show status like '%table%';
table_lock_waited 变量查看锁挡住的操作数量
```
**独占写锁**
```
lock tables 表名 write;
```
**并发插入**
```
show variables like 'concurrent_insert';
set global concurrent_insert=2;
lock table 表名 read local;
```