创建用户
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';
网友评论