1、登录:mysql -uroot -proot
2、查询用户:select host,user,password from mysql.user;
3、 创建用户:create user 'xiuyin'@'localhost' identified by 'zhao';
4、查询用户权限:show grants for 'xiuyin'@'localhost';
5、 用户授权:grant all on xiuyin.* to xiuyin@'%' identified by 'zhao';
6、修改用户密码:set password for 'xiuyin'@'localhost' =password('123456');
7、修改用户名:rename user 'xiuyin'@'localhost' to 'xiuyin1'@'localhost';
8、删除用户:drop user 'xiuyin'@'%';