mysql版本信息:
mysql Ver 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.