windows下
可以进入Mysql的安装文件夹下 打开配置文件重新配置即可,勾选允许远程登录(Enable root access from remote machines)
linux 进入命令行模式,输入以下命令:
mysql
use mysql;
select * from user;
delete from user;
grant all privileges on *.* to "username"@"%" identified by "password" with grant option;
flush privileges;
quit;