Home > Database > Mysql Tutorial > body text

How to solve the problem of mysql table deletion getting stuck

藏色散人
Release: 2020-11-02 11:51:22
Original
4321 people have browsed it

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!!
Copy after login

Then execute:

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

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!