远程无法连接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;

posted @ 2014-03-11 18:51  智客工坊  阅读(254)  评论(1编辑  收藏  举报