Siddhant Sahni
Siddhant Sahni

Reputation: 157

Error while trying to start MySQL

I have installed mysql as a service and is running.

enter image description here

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:

enter image description here Here is my screenshot for the error.

Upvotes: 0

Views: 93

Answers (1)

Varsha Nadar
Varsha Nadar

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

Related Questions