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

Mariadb utility feature 1 kill user xxx

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

Share

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

Practicability

In the work of operation and maintenance, it is often encountered that when you need to kill a user, MySQL does not have the function of direct Kill user.

But mariadb has this function for a long time, this is really too sweet, the practical value is extremely high.

two。 Let's get to work and hit the order hard to see the result.

MariaDB [none)] > select version ()

->

+-+

| | version () |

+-+

| | 10.1.20-MariaDB |

+-+

1 row in set (0.00 sec)

MariaDB [(none)] > show processlist

+-- +

| | Id | User | Host | db | Command | Time | State | Info | Progress |

+-- +

| | 8 | root | localhost | NULL | Query | 0 | init | show processlist | 0.000 | |

| | 12 | roidba | 192.168.1.92 NULL 56950 | NULL | Sleep | 17 | NULL | 0.000 |

+-- +

2 rows in set (0.00 sec)

MariaDB [(none)] > kill user roidba

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)] > show processlist

+-- +

| | Id | User | Host | db | Command | Time | State | Info | Progress |

+-- +

| | 8 | root | localhost | NULL | Query | 0 | init | show processlist | 0.000 | |

+-- +

1 row in set (0.00 sec)

MariaDB [(none)] >

3. Official website connection

Https://mariadb.com/kb/en/mariadb/data-manipulation-kill-connection-query/

If we are going to choose a database, then we must have in-depth understanding and testing of the selected database. Be the most skilled

What I dislike is the person who only moves his mouth and does not do it!

It's happier to knock every day!

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

Database

Wechat

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

12
Report