美文网首页
MySQL 用户管理

MySQL 用户管理

作者: Joening | 来源:发表于2021-06-30 14:37 被阅读0次

创建用户

mysql> create user qiaoning@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)

mysql> create user qiaoning@'10.0.0.%' identified by '123';
Query OK, 0 rows affected (0.00 sec)

删除用户

mysql> drop user qiaoning@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> drop user qiaoning@'10.0.0.%';
Query OK, 0 rows affected (0.00 sec)

锁定用户 及 解锁用户

mysql> alter user qiaoning@'localhost' account lock;
Query OK, 0 rows affected (0.00 sec)
mysql> alter user qiaoning@'localhost' account unlock;
Query OK, 0 rows affected (0.00 sec)

修改密码

mysql> alter user qiaoning@'localhost' identified by '123';

相关文章

网友评论

      本文标题:MySQL 用户管理

      本文链接:https://www.haomeiwen.com/subject/hpwpoktx.html