- 实用性
在运维工作中,经常会遇到需要kill 掉某个用户的时候,MySQL 没有直接Kill user 的功能,
但是mariadb 早就有这个功能了,这个真的太贴心了,实用价值极高。
2.赶紧干起来吧,狠敲命令看结果
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.官网连接
https://mariadb.com/kb/en/mariadb/data-manipulation-kill-connection-query/
如果我们要去选择一款数据库,那么我们一定要对选择的数据库有深入的了解和测试。搞技术最
反感的就是只动嘴,不动手的人!!
每天敲敲更快乐!