rhandom
rhandom

Reputation: 1278

Error 1045 (28000) Cannot stop mysql

I'm trying to stop MySQL using sudo mysql stop command but I'm getting

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

I've seen some answers in the internet that I need to stop MySQL and update the password but my initial problem was I'm having an error in stopping MySQL.

Upvotes: 1

Views: 506

Answers (2)

Iván Pérez
Iván Pérez

Reputation: 2539

To stop the MySQL service you should do

sudo service mysqld stop

With mysql stop you are trying to connect to a database called stop, with your current user and no password.

Upvotes: 1

David
David

Reputation: 532

what kind of linux are you using? you can try

    sudo service mysqld stop

or in slackware you can try

    sudo /etc/rc.d/rc.mysqld stop

Upvotes: 0

Related Questions