1.root用户登录MySQL
2.新建用户
create user '用户名'@'%' identified by '密码';
3.修改用户权限
如:需要对该新用户指定某个数据库的读写权限
grant all on 数据库名.表名 to '用户名'@'%' identified by '密码';
4.查看用户权限
show grants for '用户名'@'%';
5.删除某用户
drop user '用户名'@'%';
create user '用户名'@'%' identified by '密码';
如:需要对该新用户指定某个数据库的读写权限
grant all on 数据库名.表名 to '用户名'@'%' identified by '密码';
show grants for '用户名'@'%';
drop user '用户名'@'%';