allinster 发表于 2013-1-6 14:54:22

远程访问mysql,第一次拒绝,以后可以访问是怎么回事

运行环境:
Distributor ID: SUSE LINUX
Description:    openSUSE 11.1 (x86_64)
Release:      11.1

mysql版本信息:
mysqlVer 14.12 Distrib 5.0.67, for suse-linux-gnu (x86_64) using readline 5.2

现象:
已经使用
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypasswd' WITH GRANT OPTION;和flush privileges;
启动了root的远程访问能力,但是在第一次访问时,拒绝连接,第二次就可以,以后都可以连接:
(数据库为192.168.6.251 访问数据库的机器为192.168.6.130)

root@host# mysql -u root -p -h 192.168.1.251
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'192.168.1,130' (using password: YES)
root@host# mysql -u root -p -h 192.168.1.251
Enter password:
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 40
Server version: 5.0.67-log SUSE MySQL RPM

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> Bye
root@host#

求大牛们给个解啊,谢谢!


kider 发表于 2013-1-6 16:27:44

怪异的现象,难道是权限分配暂时没有生效? 或是防火墙那里的问题?有点没法解释...

allinster 发表于 2013-1-6 16:41:23

也执行过flush了,应该就生效才对呀。
页: [1]
查看完整版本: 远程访问mysql,第一次拒绝,以后可以访问是怎么回事