码迷,mamicode.com
首页 > 数据库 > 详细

mariadb 实用功能1 kill user xxx

时间:2016-12-29 11:26:25      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:mariadb 实用功能1 kill user xxx


  1. 实用性

在运维工作中,经常会遇到需要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/


如果我们要去选择一款数据库,那么我们一定要对选择的数据库有深入的了解和测试。搞技术最

反感的就是只动嘴,不动手的人!!


每天敲敲更快乐!


本文出自 “roidba” 博客,请务必保留此出处http://roidba.blog.51cto.com/12318731/1887179

mariadb 实用功能1 kill user xxx

标签:mariadb 实用功能1 kill user xxx

原文地址:http://roidba.blog.51cto.com/12318731/1887179

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!