can't stop or start mysql on fedora 17

4

I have recently setup a fedora 17 machine with Gnome and installed Mysql using the add/remove software GUi included. Mysql seems to be working - I can login, select databases, do queries etc but if I try to stop/start or get the status of the service in a teminal I get this:

#service mysql stop
Redirecting to /bin/systemctl stop  mysql.service
Failed to issue method call: Unit mysql.service not loaded.
[root]#service mysql start 
Redirecting to /bin/systemctl start  mysql.service
Failed to issue method call: Unit mysql.service failed to load: No such file or directory. See system logs and 'systemctl status mysql.service' for details.

[root]# service mysql status
Redirecting to /bin/systemctl status  mysql.service
mysql.service
      Loaded: error (Reason: No such file or directory)
      Active: inactive (dead)

Why? I'm trying to get Mysql workbench working.....

ChrisGS

Posted 2013-01-19T23:05:05.137

Reputation: 41

Answers

1

If mysql was installed successfully, it should start with:

service mysqld start

The error message is confusing as it doesn't explicitly tell that you typed it wrong.

Kride

Posted 2013-01-19T23:05:05.137

Reputation: 1 079

1

The following should show you if you have the service installed:

systemctl status mysqld.service

(try "yum install mysql" if not.)

That will also tell you if it's enabled. If not:

systemctl enable mysqld.service

That enables starting on reboot. (You don't HAVE to do that.)

systemctl start mysqld.service

will start it for you.

Adam Benjamin

Posted 2013-01-19T23:05:05.137

Reputation: 41

0

Simple, the service's name is mysqld, not mysql!

so all commands just need one mode character

examples:

service mysqld start

systemctl start mysqld

chconfig mysqld on

systemctl enable mysqld

KJ4IPS

Posted 2013-01-19T23:05:05.137

Reputation: 801

0

as far as I know, MySQL is replaced with its fork MariaDB

so following commands will probabily work on CentOS 7 and other same versions:

systemctl stop mariadb.service //Stop MySQL Service

systemctl start mariadb.service //Start MySQL Service

systemctl restart mariadb.service //Restart MySQL Service

AttiqueNoor

Posted 2013-01-19T23:05:05.137

Reputation: 11

This worked for me on CentOS 7.2. This answer should be kept kere for those users, since RPM-based distros such as Fedora are similar and Google directs search results for CentOS here. – Damien Ó Ceallaigh – 2017-01-09T06:40:57.940