Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

There are many mysql links. Delete exception process processlist in batch.

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

If a process is found to be abnormal under normal circumstances.

The process can be killed by kill id

But if the access is deleted in large quantities, it can't be killed by hand.

The command is as follows

Handling method (get the abnormal id through mysql-e, and then pass the value to mysqladmin through the xargs command)

This is the result of the test environment itself.

Mysql-udba-paired recording procedures *-h 192.1.1.1-P 3700-BNe\

"select id from information_schema.processlist where time > = '500' and command='sleep';"\

| | / usr/bin/xargs-n 1 mysqladmin-udba-p *-h 192.1.1.1-P 3700 kill |

If it is a production environment

Mysql-udba-paired recording procedures *-h 192.1.1.1-P 3700-BNe\

"select id from information_schema.processlist where STATE='Sending data';"\

| | / usr/bin/xargs-n 1 mysqladmin-udba-paired kill *-h 192.1.1.1-P 3700 kill |

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report