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