实用性
在运维工作中,经常会遇到需要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/
如果我们要去选择一款数据库,那么我们一定要对选择的数据库有深入的了解和测试。搞技术最
反感的就是只动嘴,不动手的人!!
每天敲敲更快乐!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。