Solutions to mysql table being locked: 1. Violent solution, that is, restart MYSQ; 2. Check the table status through the "show processlist;" command; 3. Kill the lock through the "KILL10866;" command The process ID of the table.
The solution to the mysql table being locked is as follows:
1. Violent solution
Restart MYSQL (restart solution Question tool, manual and funny)
2. Check the table situation:
show processlist;
State状态为Locked即被其他查询锁住
3. Kill the process ID of the locked table
KILL 10866;//后面的数字即时进程的ID
The above is the detailed content of What should I do if mysql table is locked?. For more information, please follow other related articles on the PHP Chinese website!