远程无法连接Mysql 的解决方案

问题描述:

新安装了MySQL 5.6,使用root用户无法远程连接,

提示Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server

 

解决方案:

最简单的办法就是通过授权解决,以下的语句是允许username使用password密码从任何IP连接MySQL Server:

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

转载于:https://www.cnblogs.com/lucky_hu/p/3594645.html