zoukankan      html  css  js  c++  java
  • (转)percona的安装、启动、停止

    原文: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
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    CLR via C#(11)-无参属性、索引器
    CLR via C#(10)-参数
    C#委托的介绍(delegate、Action、Func、predicate)
    MVC3使用Unity实现接口自动注册
    CLR via C#(09)-扩展方法
    CLR via C#(08)-操作符
    CLR via C#(07)-静态类,分部类
    CLR via C#(06)- 构造器
    VS2010几款超赞的扩展辅助工具总结
    web前端开发随手笔记
  • 原文地址:https://www.cnblogs.com/liujiacai/p/10332501.html
Copyright © 2011-2022 走看看