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

1.mysql版本

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

2.配置mysqld.service文件
[Unit]Description=mysql server daemonAfter=network.target mysql-keygen.target[Service]Type=forkingExecStart=/usr/local/mysql/support-files/mysql.server startExecStop=/usr/local/mysql/support-files/mysql.serverstopExecReload=/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 -antlStateRecv-QSend-QLocal Address:PortPeer Address:PortProcessLISTEN01280.0.0.0:1110.0.0.0:*LISTEN032192.168.122.1:530.0.0.0:*LISTEN01280.0.0.0:220.0.0.0:*LISTEN05127.0.0.1:6310.0.0.0:*LISTEN0128[::]:111[::]:*LISTEN0128[::]:22[::]:*LISTEN05[::1]:631[::]:*LISTEN080*:3306*:*

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

    推荐阅读