Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 17:18:09
Original
944 people have browsed it

在CentOS上把mysql都配置好了,在Linux下登录mysql都没有问题,但是在Windows下用navicat远程连接连接msyql时报 is not allowed

在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 一下   ^_^

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!