Mysql开启远程访问权限

登录MySql数据库:

mysql -u root -p

2019040819360648.png

 修改表

use mysql;

select host, user from user;


20190408193859531.png

修改权限 

 update user set host = '%' where user = 'root';

2019040819412724.png

 授予所有权限

grant all privileges  on . to root@'%' identified by "pwd"; 

 刷新

 FLUSH PRIVILEGES;