rhel4 mysql5.1登陸ERROR 1045 (28000): Access denied for user

wisdomone1發表於2010-06-19

[root@capitek1 mysql]# mysql -uroot -p -h192.168.125.8
Enter password:
ERROR 1045 (28000): Access denied for user (using password: YES)

 

修改/etc/my.cnf client節中的socket,因為登陸mysql server是透過客戶端工具:mysql等

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
#socket         = /var/lib/mysql/mysql.sock
socket          = /mysql/data/mysql/mysql.sock

[root@capitek1 bin]# mysql -uroot -p123456 -hlocalhost #再次登陸ok
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.48-community-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-665684/,如需轉載,請註明出處,否則將追究法律責任。

相關文章