Home  >  Article  >  Database  >  What should I do if mysql table is locked?

What should I do if mysql table is locked?

藏色散人
藏色散人Original
2019-05-08 10:47:1228108browse

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.

What should I do if mysql table is locked?

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;

What should I do if mysql table is locked?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn