1、显示所有用户
SELECT User, Host, Password FROM mysql.user;
2、授权用户使用某个数据库。
grant select on my_db.* to hjh;
3、设置密码
set password for hjh = password('xxx');
4、修改原有密码
mysql> use mysql;
mysql> update user set password=password('123') where user='root' and host='localhost';
mysql> flush privileges;