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

0

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?

ympostor

Posted 2016-07-06T04:15:00.683

Reputation: 109

Answers

0

Have you tried this command?:

sudo service mysql stop

If you need to run:

 sudo service mysql start

Chosenman

Posted 2016-07-06T04:15:00.683

Reputation: 121

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: [answer], again welcome to superuser. – mic84 – 2018-06-17T05:14:42.527