MySQL使用service
# cat /usr/lib/systemd/system/mysql3306.service
# /usr/lib/systemd/system/mysql3306.service
[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
User=mysql
Group=mysql
ExecStart=/usr/local/mysql/bin/mysqld_safe --defaults-file=/data/apps/mysql/mysql3306/my.cnf
LimitNOFILE = 65535