接着上面一的内容
4.设置更改用户密码
命令格式:SET PASSWORD FOR 'username'@'host'=PASSWORD('newpassword');
如果是当前登录用户用:SET PASSWORD = PASSWORD('newpassword');
如:SET PASSWORD FOR 'atom'@'%'=PASSWORD('atom');
5.取消用户权限
命令格式:REVOKE privilege ON databasename.tablename FROM 'username'@'host';
ps: privileges,databasename,tablename同一部分授权内容
如:REVOKE privileges ON . FROM 'zhangw'@'%';
...
具体信息可以用命令:SHOW GRANTS FOR 'zhangw'@''%; 来查看
6.删除用户
命令格式:DROP USER 'username'@'host';
如:DROP USER 'zhangw'@'%';