shimmy
03-06-2001, 09:47 PM
Hi,
I had MySQL installed fine, but I was just trying to change the MySQL default password for "root", but I messed up and Typed
-------------------------------------------
mysql> update user set Password='mypassword' where User="root";
Query OK, 2 rows affected (0.02 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.09 sec)
mysql> exit
-------------------------------------------
And now there is no password for "root".
So when I telnet and I type...
mysql -u root
I get the mysql prompt
But when I type,
use mysql;
I now get this error "ERROR 1044: Access denied for user: '@localhost' to database 'mysql'"
Which I never got before.
I can't figure out how to fix it, I tried commands like these...
SET PASSWORD FOR root= mypassword;
or
SET PASSWORD FOR root= 'mypassword';
or
SET PASSWORD FOR root= (mypassword);
but nothing works, I guess since I cant type "use mysql;"
Any ideas on what I can do?
I had MySQL installed fine, but I was just trying to change the MySQL default password for "root", but I messed up and Typed
-------------------------------------------
mysql> update user set Password='mypassword' where User="root";
Query OK, 2 rows affected (0.02 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.09 sec)
mysql> exit
-------------------------------------------
And now there is no password for "root".
So when I telnet and I type...
mysql -u root
I get the mysql prompt
But when I type,
use mysql;
I now get this error "ERROR 1044: Access denied for user: '@localhost' to database 'mysql'"
Which I never got before.
I can't figure out how to fix it, I tried commands like these...
SET PASSWORD FOR root= mypassword;
or
SET PASSWORD FOR root= 'mypassword';
or
SET PASSWORD FOR root= (mypassword);
but nothing works, I guess since I cant type "use mysql;"
Any ideas on what I can do?
