I’m working with someone who is having MySQL connection problems, and is running MySQL 4.1.22. The root password seems to have been lost or changed, and I’m having a hard time getting it correctly changed. Here’s what I’ve tried:
- Added
skip-grant-tablesto their my.cnf - Restarted MySQL
- Successfully logged into MySQL
-
Run the following:
mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD(“thepassword”) where User=’root’;
Query OK, 2 rows affected (0.03 sec)
Rows matched: 2 Changed: 2 Warnings: 0mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec) -
Remove
skip-grant-tablesfrom my.cnf and restart MySQL.
However, this doesn’t seem to resolve the issue, and still prevents access to MySQL as root with the correct password.
Anyone have any ideas? I’m not too savvy with MySQL 4, so I may be doing something wrong here, but from what I’ve read that should work.
Have you checked the value you have for ‘Host’? In other words are you trying to login as root from a host that isn’t allowed?