mysql的锁定表一般适用于myisam引擎的表

mysql>lock table tablename write|read;

mysql>unlock table;

锁定表的目的在于防止其他客户端更改表,保证数据的一致性