新闻动态
新闻动态
NEWS INFORMATION

mysql5.7单实例自启动服务配置过程

发布日期:2022-02-07 14:41 | 文章来源:脚本之家

1.mysql版本

[root@clq system]# mysql -v
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.7.33 MySQL Community Server (GPL)

2.配置mysqld.service文件

[Unit]
Description=mysql server daemon
After=network.target mysql-keygen.target
[Service]
Type=forking
ExecStart=/usr/local/mysql/support-files/mysql.server start
ExecStop=/usr/local/mysql/support-files/mysql.server   stop
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
[Install]
WantedBy=multi-user.target

3.mysqld.service文件放置的地方

/usr/lib/systemd/system/mysqld.service

4.自启动

 systemctl daemon-reload 
systemctl enable --now mysqld
[root@mysql ~]# ss -antl
State         Recv-Q        Send-Q               Local Address:Port               Peer Address:Port        Process        
LISTEN        0             128                        0.0.0.0:111                     0.0.0.0:*                          
LISTEN        0             32                   192.168.122.1:53                      0.0.0.0:*                          
LISTEN        0             128                        0.0.0.0:22                      0.0.0.0:*                          
LISTEN        0             5                        127.0.0.1:631                     0.0.0.0:*                          
LISTEN        0             128                           [::]:111                        [::]:*                          
LISTEN        0             128                           [::]:22                         [::]:*                          
LISTEN        0             5[::1]:631                        [::]:*                          
LISTEN        0             80   *:3306                          *:*  

以上就是mysql5.7单实例自启动服务配置过程的详细内容,更多关于mysql5.7单实例自启动服务配置的资料请关注本站其它相关文章!

海外服务器租用

版权声明:本站文章来源标注为YINGSOO的内容版权均为本站所有,欢迎引用、转载,请保持原文完整并注明来源及原文链接。禁止复制或仿造本网站,禁止在非www.yingsoo.com所属的服务器上建立镜像,否则将依法追究法律责任。本站部分内容来源于网友推荐、互联网收集整理而来,仅供学习参考,不代表本站立场,如有内容涉嫌侵权,请联系alex-e#qq.com处理。

实时开通

自选配置、实时开通

免备案

全球线路精选!

全天候客户服务

7x24全年不间断在线

专属顾问服务

1对1客户咨询顾问

在线
客服

在线客服:7*24小时在线

客服
热线

400-630-3752
7*24小时客服服务热线

关注
微信

关注官方微信
顶部