MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Posted by: Artemis Voulkidis
Date: May 28, 2009 05:14AM

There is a simple and efficient way to deal with this problem if you want to login with a password:

1. Open a konsole window. For linux a common shell should be ok, windows users can use cmd or powershell.
2. Type the command

mysql -u root mysql

3. Then, the following:

mysql> UPDATE user SET password=PASSWORD("NEW_PASSWORD") WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit

Where NEW_PASSWORD is the password you want to setup.

4. You exit the shell and restart the server. You should be now able to connect to the mysql server.

Options: ReplyQuote


Subject
Written By
Posted
June 27, 2009 08:29PM
December 16, 2007 02:18AM
December 27, 2007 02:08PM
January 16, 2011 06:51AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
May 28, 2009 05:14AM
August 27, 2009 12:22AM


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.