急救:MySQL登陆密码问题!!!!!!
zgtt 2003-03-06 11:23:11 我执行的过程:
C:\mysql\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.0.10-gamma-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Database changed
mysql> select host,user,password from user;
+-----------+------+----------+
| host | user | password |
+-----------+------+----------+
| localhost | root | 123 |
| % | root | 123 |
| localhost | | |
| % | | |
+-----------+------+----------+
4 rows in set (0.05 sec)
mysql> update user set password="1234" where user="root" and host="%";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
C:\mysql\bin>mysql -u root -p
Enter password: ****
ERROR 1045: Access denied for user: 'root@127.0.0.1' (Using password: YES)
C:\mysql\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.0.10-gamma-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Database changed
mysql> select host,user,password from user;
+-----------+------+----------+
| host | user | password |
+-----------+------+----------+
| localhost | root | 123 |
| % | root | 1234 |
| localhost | | |
| % | | |
+-----------+------+----------+
4 rows in set (0.00 sec)
请高手指教,为什么我该了ROOT的密码后,用mysql -u root -p命令,输入密码1234,还是提示ERROR 1045: Access denied for user: 'root@127.0.0.1' (Using password: YES)错误啊.
我该怎么做呢?实验了好多次了.都是提示这个错误.
谢谢.