July 27, 2009 | In: how-to, Tips & Tricks

ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)

Today I got the error below :

after typing :

I don’t know why ? but I know how to solve it.
First of all let’s disable password authentication :
Stop your MySQL daemon:

or

Then run the following command line in background :

Secondly run :

Finally, In your MySQL command line prompt issue the following command:

Password is now reset to my_password. So just restart your MySQL server using :

or

and use your new password to authenticate :

All that remains is to enter your password.

4 Responses to ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)

Avatar

Gbenga

August 27th, 2009 at 22:55

still not working i have tried the steps over and over

Avatar

el arbi

December 25th, 2009 at 07:12

hello can you telle me pleaze how can we do it in windows (with wamp)

Avatar

Oussama

June 4th, 2010 at 10:15

Hello, I get this error on WAMP(Windows) when i tried to connect to the database via phpMyAdmin you can do the following : - go to %WAMP_DIR%appsphpmyadmin2.11.6config.inc.php file - change the value of $cfg['Servers'][$i]['password'] to your password - restart the services (Apache & MySQL)

Avatar

geomatag

September 11th, 2010 at 02:43

Thanks a lot for this. I followed the procedure exactly and now i can go in the mysql database. I was beggining to loose hope reading tens of articles about this ERROR. Thank God i found your website. I've already bookmarked it. Thanks again

Comment Form

Categories