MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Posted by: fasil KM
Date: August 09, 2009 05:14AM

Hello all,
Found a solution for the issue...please follow these
1. be sure that mysql server is running
2. edit the file /etc/my.cnf
2.1 - under [mysqld] section, add the line 'skip-grant-tables'
2.2 - save the file
3. restart mysql server
4. now you will be able to login using 'mysql -u root' and you should get the mysql prompt.

If u want to reset the password of the root user for mysql follow the steps below:
1. mysql> UPDATE user SET Password=PASSWORD('new_password') where USER='root';
where 'new_password' is the new password for the user: root.
2. mysql> exit;
3. remove the 'skip-grant-tables' line from /etc/my.cnf
4. restart mysql server again
5. now login using 'mysql -u root -p'
6. password: <type in your new password>
7. you should get the mysql prompt

Enjoyyy!!!!!!!!!!

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)
August 09, 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.