mysql授权
授权用户所有权限
grant all on . to ‘用户‘@"%" identified by "密码";
grant alter,insert,select,delete,update,create,drop on . to ‘用户‘@"%" identified by "密码";
FLUSH PRIVILEGES;
grant update,insert,select,create,DELETE on nad.* to ‘svsadmin‘@"%";
授权查询权限
grant select on . to 用户@"%" identified by "密码";
撤销drop权限
revoke drop on . from ‘用户‘@"%";
mysql查看用户列表
mysql> select host,user from mysql.user;
查询授权用户权限
show grants for 用户名;
删除账户及权限
drop user 用户名@‘%‘;
原文:https://blog.51cto.com/13293070/2441460