MySQL5.7 授权可以远程连接数据库步骤
1:修改user表root用户的host的字段
update user set host = '%' where user = 'root';
2:授权可以远程使用root账户连接MySQL
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你的MYSQL ROOT密码' WITH GRANT OPTION;
3:使授权生效
FLUSH PRIVILEGES;
4:重启MySQL服务(必须)