ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)
Friday, May 1, 2009 4:14:25 PM
Well after you have installed the application server with php and mysql how I found the problem ERROR 1045 (28000): Access denied for user ‘root’ @ ‘localhost’ (using password: NO). Well this problem would not let me access the mysql database so I searched and found a very practical solution for it and will show in the following lines which will be placed on the terminal:
1. Stop the MySQL service
2. MySQL privileges skip !!!!
# / usr / bin / mysqld_safe – user = mysql – skip-grant-tables
3. Open another terminal and WRITE
4. We are already in the database,so use the database named mysql
# use mysql;
5. We update the root user password field as follows
UPDATE user SET Password = PASSWORD (‘our_password’) WHERE user = ‘root’;
6. We leave the mysql shell
7. We begin a new session in the database from the terminal
# mysql-u root-p
and we have to get our password and ready to work.
Until next time!