语法: Delete from user where user = "user_name" and host = "host_name" ;
例子:delete from user where user='sss' and host='localhost';
或者: 取消一个账户和其权限
Drop USER user;
drop user username@'%'
drop user username@localhost
mysql的用户信息都在
系统数据库mysql,授权表user里存储
自己可以看一下,user,host,password三个字段,其他字段为权限信息
想要删除哪个,删除或修改记录就可以了
修改后重启mysql,刷新授权表才能生效
你指的是host是HostName账号和localhost账号吧?
进入mysql 数据库
执行以下sql即可:
use mysql;
delete from user where host in('localhost','HostName');
flush privileges;
这样就ok了