首页 > 其他 > 详细

(转)percona的安装、启动、停止

时间:2019-01-29 10:19:24      阅读:211      评论:0      收藏:0      [点我收藏+]

原文:https://blog.csdn.net/tanliqing2010/article/details/78758878


socket=/percona/3307/data/mysql.sock
[root@localhost ~]#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 Server
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
Alias=mysql.service
[Service]
# Needed to create system tables etc.
ExecStartPre=/usr/bin/mysql_install_db --defaults-file=/root/my.cnf --user=mysql
# Start main service
ExecStart=/usr/bin/mysqld_safe --defaults-file=/root/my.cnf --user=mysql
# Don‘t signal startup success before a ping works
ExecStartPost=/usr/bin/mysqladmin --defaults-file=/root/my.cnf
# Give up if ping don‘t get an answer
TimeoutSec=600
Restart=always
PrivateTmp=false
[root@localhost ~]#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
3. 我们需要创建这些文件夹和文件
[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 ~]#
1
2
3
4
4. 使用systemctl启动percona服务
---------------------
作者:tanliqing2010
来源:CSDN
原文:https://blog.csdn.net/tanliqing2010/article/details/78758878
版权声明:本文为博主原创文章,转载请附上博文链接!

(转)percona的安装、启动、停止

原文:https://www.cnblogs.com/liujiacai/p/10332501.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!