Today I got the error below :
1
| ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) |
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
1
| /etc/init.d/mysqld stop |
Then run the following command line in background :
1
| mysqld_safe --skip-grant-tables & |
Secondly run :
Finally, In your MySQL command line prompt issue the following command:
1
2
3
4
| USE mysql;
UPDATE user SET password=PASSWORD("my_password") WHERE user="root";
FLUSH PRIVILEGES;
EXIT |
Password is now reset to my_password. So just restart your MySQL server using :
1
| /etc/init.d/mysql restart |
or
1
| /etc/init.d/mysqld restart |
and use your new password to authenticate :
All that remains is to enter your password.
still not working i have tried the steps over and over
hello can you telle me pleaze how can we do it in windows (with wamp)
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)
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