I'm getting a weird error when trying to stop mysql-server with the service command:

$ sudo service mysql-server stop
Failed to stop mysql-server.service: Unit mysql-server.service not loaded.

Is service at fault here, or is it mysql? How to figure out what's the problem? This is ubuntu 16.04.

Doing it directly via its script in /etc/init.d/ seems to work:

$ sudo /etc/init.d/mysql stop
[sudo] password for myuser: 
[ ok ] Stopping mysql (via systemctl): mysql.service.

Why does service not work anymore here?


Have you tried this command?:

sudo service mysql stop

If you need to run:

 sudo service mysql start
  • Welcome to Superuser: could you explain with some more detail or source information to read why your answer will work. Please take a couple of minutes and read: How to Answer, again welcome to superuser. – mic84 Jun 17 '18 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.