1.1 查询用户
mysql> use mysql;
mysql> select * from user;
1.2 创建用户
#主机名可使用%表示所有的主机
mysql> create user '用户名'@'主机名' identified by '密码';
1.3 删除用户
mysql> drop user 'mytest'@'localhost';
1.4 修改用户密码
#可选下面两种写法
mysql> update user set password = password('new_password') where user = 'mytest';
mysql> set password for 'mytest'@'localhost' = password('new_password');