创建用户:
代码语言:javascript复制create user 'fyx'@'%' identified by '123456';
赋予权限:
grant all privileges on xxxDB.* to 'fyx'@'%' ;
删除用户:
代码语言:javascript复制drop user 'fyx'@'%' ;
操作后记得刷新权限表:
代码语言:javascript复制flush privileges;
查看用户信息:
select distinct * from (select user.Host,user.User,db.Db,user.Password,user.Drop_priv,user.Grant_priv,user.Alter_priv from db inner JOIN user on db.user=user.user) as it where user='fyx';