是不是你的主机使用的有问题?
下面是我想的一个例子是这样的吗?
[angisel@fc3ise angisel]$ mysql -h localhost -u www -p
Enter password:
ERROR 1045: Access denied for user: 'www@localhost' (Using password: YES)
==============================================================
[angisel@fc3ise angisel]$ mysql -h localhost.localdomain -u www -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
[angisel@fc3ise angisel]$ mysql -h fc3ise(我的主机名) -u www -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv |
| % | ps | 565491d704013245 | Y | Y | Y | Y | Y |
| localhost | ps | 565491d704013245 | Y | Y | Y | Y | Y |