是因为没有对远程连接授权
1.在服务器连接mysql
mysql -hlocalhost -uroot -p
2.授与权限,并更新权限
grant all privileges on *.* to root@"%" identified by "password" with grant option;
flush privileges;
3.成功,可以连接了
是因为没有对远程连接授权
1.在服务器连接mysql
mysql -hlocalhost -uroot -p
2.授与权限,并更新权限
grant all privileges on *.* to root@"%" identified by "password" with grant option;
flush privileges;
3.成功,可以连接了