MARIADB Practical features 1 kill user xxx

Source: Internet
Author: User


    1. Practicability

In operation and maintenance work, often encounter the need to kill a user, MySQL does not directly kill user function,

But mariadb already has this function, this really is too intimate, the practical value is extremely high.


2. Hurry up and hit the command to see the results.

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: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. 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. The most technical

Disgust is only mouth, do not do the person!!


Every day knocks more happy!


This article is from the "ROIDBA" blog, make sure to keep this source http://roidba.blog.51cto.com/12318731/1887179

MARIADB Practical features 1 kill user xxx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.