1.查看所有用户(需要在root用户下进行)
select host,user,password from mysql.user;
2.删除用户
mysql>Delete FROM user Where User='用户名' and Host='上图有个host列表所示';//删除用户
例:mysql>Delete FROM user Where User='yl' and Host='localhost';
mysql>flush privileges; //刷新权限
mysql>drop database ylDB; //删除用户的数据库