首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

解决客户端联接mysql出现 xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server

2012-07-27 
解决客户端连接mysql出现 xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server今天在centos

解决客户端连接mysql出现 xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server

今天在centos上把mysql都配置好了,在linux下登录mysql都没有问题,但是在windows下用navicat远程连接连接msyql时报?is not allowed to connect to this MySQL server ,上网一查,发现是没有远程连接的权限

?

于是我采用新增加一个用户的方法,并赋予任意ip都可以远程连接的权限,

mysql新增用户

?

#mysql -uroot -proot

mysql> grant all privileges on *.* to 'test'@'%' identified by 'test' with grant option;

mysql>?flush privileges;

?

此处'%'很重要,代表任意ip都可以远程连接,而默认的root用户只能“localhost” 所以才会报 “?is not allowed to connect to this MySQL server” 无法连接数据库!

?

然后在远程连接一下,发现能连接了!

问题解决! mark 一下 ? ^_^

热点排行