Reputation: 157
I have installed mysql as a service and is running.
But when I try to start mysql I get this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
What is the problem? I can't seem to find any relevant solution.
Any suggestion is appreciated. Thanks for the same.
Edit:
Here is my screenshot for the error.
Upvotes: 0
Views: 93
Reputation: 41
Start the MySQL server instance
$ mysqld --skip-grant-tables
Execute these statements.
$ mysql -u root mysql
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;
$ /etc/init.d/mysql restart
$ mysql -u root -p with new password
Upvotes: 1