MySQL Forums
Forum List  »  Install & Repo

Re: Worked for me: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Posted by: Dani Alves
Date: June 02, 2011 06:40AM

I solved it in this way on Ubuntu 10.10:
Note: I assume you are logged in as root

1) vi /etc/mysql/debian.cnf

In this file, look for these fields:
user = debian-sys-maint # you may find some different value, use your value
password = GPCzJs63iCz3w3Y8 # you will find some different value, use your value


2) Use the user and password values found above in the following line:

mysql --user=debian-sys-maint --password=GPCzJs63iCz3w3Y8


3) After that you get mysql promt, type

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password');

4) type:
exit

5) In shell, type:
mysql --user=root --password=your_password


Hurray, done.

Options: ReplyQuote


Subject
Written By
Posted
June 27, 2009 08:29PM
Re: Worked for me: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
June 02, 2011 06:40AM
December 16, 2007 02:18AM
December 27, 2007 02:08PM
January 16, 2011 06:51AM
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.