在远程服务器的登陆mysql,
mysql -u root -p
执行命令
grant all privileges on *.* to
'root'@'%' identified by '
root' with grant option;
(第一个root代表mysql的用户名,第二个root代表密码)
grant all privileges on *.* to root@"localhost" identified by "root" with grant option;
执行命令,刷新权限
FLUSH PRIVILEGES;
使用navicate登陆