原文:https://blog.csdn.net/tanliqing2010/article/details/78758878
socket=/percona/3307/data/mysql.sock[root@localhost ~]# 12345678910111213141516171819202122 2. 定义一个`mysqld3307.service`文件1[root@localhost ~]# cat /usr/lib/systemd/system/mysqld3307.service ## Systemd service file for Percona Server## # This service file is to start PS just with mysqld_safe#[Unit]Description=MySQL Percona ServerAfter=network.targetAfter=syslog.target[Install]WantedBy=multi-user.targetAlias=mysql.service[Service]# Needed to create system tables etc.ExecStartPre=/usr/bin/mysql_install_db --defaults-file=/root/my.cnf --user=mysql# Start main serviceExecStart=/usr/bin/mysqld_safe --defaults-file=/root/my.cnf --user=mysql# Don't signal startup success before a ping worksExecStartPost=/usr/bin/mysqladmin --defaults-file=/root/my.cnf # Give up if ping don't get an answerTimeoutSec=600Restart=alwaysPrivateTmp=false[root@localhost ~]# 123456789101112131415161718192021222324253. 我们需要创建这些文件夹和文件[root@localhost ~]# mkdir -p /percona/3307/{data,log,run}[root@localhost ~]# touch /percona/3307/log/mysqld.log[root@localhost ~]# chown -R mysql:mysql /percona/3307[root@localhost ~]# 12344. 使用systemctl启动percona服务--------------------- 作者:tanliqing2010 来源:CSDN 原文:https://blog.csdn.net/tanliqing2010/article/details/78758878 版权声明:本文为博主原创文章,转载请附上博文链接!