MySQL5.7 single instance self-starting service configuration process

MySQL5.7 single instance self-starting service configuration process

1.MySQL version

[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. Configure the mysqld.service file

[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. Where the mysqld.service file is placed

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

4. Self-start

 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 *:*  

The above is the detailed content of the MySQL 5.7 single instance self-starting service configuration process. For more information about the MySQL 5.7 single instance self-starting service configuration, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Detailed explanation of the installation, configuration, startup and shutdown methods of the Mysql server
  • MySQL multi-instance installation boot auto-start service configuration process
  • MySQL configuration master-slave server (one master and multiple slaves)
  • MySQL in Windows net start mysql Start MySQL service error occurs System error solution
  • 5 MySQL GUI tools recommended to help you with database management
  • 19 MySQL optimization methods in database management
  • Detailed introduction to 5 commonly used MySQL database management tools
  • Summary of Common Commands for MySQL Database Management
  • MySQL service and database management

<<:  Detailed explanation of JavaScript BOM composition and common events

>>:  How to use docker compose to build fastDFS file server

Recommend

Vue3.0 adaptive operation of computers with different resolutions

First we need to install some dependencies npm i ...

JavaScript data flattening detailed explanation

Table of contents What is Flattening recursion to...

Understanding MySQL index pushdown in five minutes

Table of contents What is index pushdown? The pri...

Gojs implements ant line animation effect

Table of contents 1. Gojs Implementation 1. Drawi...

Docker+selenium method to realize automatic health reporting

This article takes the health reporting system of...

Some suggestions for improving Nginx performance

If your web application runs on only one machine,...

Detailed explanation of the application of CSS Sprite

CSS Sprite, also known as CSS Sprite, is an image...

Example verification MySQL | update field with the same value will record binlog

1. Introduction A few days ago, a development col...

How does the composite index of MySQL take effect?

Table of contents background Understanding compos...

Detailed explanation of long transaction examples in MySQL

Preface: The "Getting Started with MySQL&quo...

Methods and problems encountered in installing mariadb in centos under mysql

Delete the previously installed mariadb 1. Use rp...

How to use Navicat to export and import mysql database

MySql is a data source we use frequently. It is v...