Home >Database >Mysql Tutorial >How to solve the problem of mysql table deletion getting stuck

How to solve the problem of mysql table deletion getting stuck

藏色散人
藏色散人Original
2020-11-02 11:51:224413browse

The solution to mysql table deletion stuck: first execute the "show full processlist;" statement; then execute the "kill processid;" statement; finally use the kill statement to kill all ids and restart MySQL. .

How to solve the problem of mysql table deletion getting stuck

Recommendation: "mysql video tutorial"

MySQL table cannot be modified, deleted, etc., stuck. How to deal with dead and locked situations.

MySQL If the data of a table is frequently modified, the table will be locked. Causing suspended animation.

For example, if you use a connection tool such as Navicat, Navicat will not respond directly and you can only force close the software, but it will still be ineffective after restarting.

Solution:

First execute:

show full processlist;  //列出当前的操作process,一般会看到很多waiting的process,说明已经有卡住的proces了,我们要杀死这些process!!

Then execute:

kill processid;  //processid表示process的id,比如kill 3301,就会将id为3301的process杀死。

Use kill to kill all ids. Then restart MySQL and it will usually be solved. If it still doesn't work, it should be impossible. . .

Restart MySQL:

net stop mysql  //停止MySQL
net start mysql  //启动MySQL

The above is the detailed content of How to solve the problem of mysql table deletion getting stuck. 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