MySQL Forums
Forum List  »  Newbie

Re: Unable to login to mysql database after system restart
Posted by: Rick James
Date: December 17, 2011 04:38PM

You seem to be working too hard.

You should not have to navigate to the directory; it should be in your "path".

Don't use an init file to establish the GRANTs. Instead go get into the commandline "mysql" and do
SHOW GRANTS FOR 'root'@'localhost';
You should see something like
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*1234..' WITH GRANT OPTION
Then do
SELECT PASSWORD('your root password');
It should respond with the same string ('*1234...').

If you don't see such, then do (after becoming root by some means):
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'your root password' WITH GRANT OPTION;
(Note the difference in password syntax.)

After that, I would expect this (from a cmd window):
C:\> mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 482
Server version: 5.1.30-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Options: ReplyQuote


Subject
Written By
Posted
Re: Unable to login to mysql database after system restart
December 17, 2011 04:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.