MySQL Forums
Forum List  »  Install & Repo

mysqld.service and redhat 7 systemctl
Posted by: Paul Singleton
Date: April 24, 2015 09:26AM

I am trying to get mysql to run as a service via systemctl. I have never had any issues getting it to run under service command but now I cannot get it to run under systemctl. I thought it had to do with using chroot but even that doesn't seem to be the problem.

Here is my mysqld.service file:

[Unit]
Description=MySQL Community Server
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target
Alias=mysql.service

[Service]
# Start main service
ExecStart=/usr/share/mysql/mysql.server start
ExecStop=/usr/share/mysql/mysql.server stop

# Give up if ping don't get an answer
TimeoutSec=600

Restart=always
PrivateTmp=false

If I run the ExecStart command by hand all is good -- just wont start via systemctl

I get the following error:

mysqld.service - MySQL Community Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled)
Active: failed (Result: start-limit) since Fri 2015-04-24 08:22:37 PDT; 1min 31s ago
Process: 10542 ExecStop=/usr/share/mysql/mysql.server stop (code=exited, status=0/SUCCESS)
Process: 9922 ExecStart=/usr/share/mysql/mysql.server start (code=exited, status=1/FAILURE)
Main PID: 9922 (code=exited, status=1/FAILURE)

Apr 24 08:22:37 willard systemd[1]: Unit mysqld.service entered failed state.
Apr 24 08:22:37 willard systemd[1]: mysqld.service holdoff time over, scheduling restart.
Apr 24 08:22:37 willard systemd[1]: Stopping MySQL Community Server...
Apr 24 08:22:37 willard systemd[1]: Starting MySQL Community Server...
Apr 24 08:22:37 willard systemd[1]: mysqld.service start request repeated too quickly, refusing to start.
Apr 24 08:22:37 willard systemd[1]: Failed to start MySQL Community Server.
Apr 24 08:22:37 willard systemd[1]: Unit mysqld.service entered failed state.

Any help would be appreciated.

Options: ReplyQuote


Subject
Written By
Posted
mysqld.service and redhat 7 systemctl
April 24, 2015 09:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.