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

远程链接MySQL,出现上面的错误,说明没有设置可远程链接,可按以下方式解决。

1、更改数据库mysql中的user表中的host字段,有localhost改为‘%’   

use mysql;

update user host='%' where host='localhost'

flush privileges;

 

2、用grant方式设置权限。还没试-。-

posted @ 2014-10-31 16:55  Craze_lee  阅读(127)  评论(0编辑  收藏  举报