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单实例自启动服务配置的资料请关注www.887551.com其它相关文章!