Mysql service file

Time:2022-8-11

/etc/systemd/system/mysqld.service

[Unit]

Description=MySQL Server

Documentation=man:mysqld(8)

After=network.target

After=syslog.target

[Install]

WantedBy=multi-user.target

[Service]

User=root

Group=root

ExecStart=/app/mysql/bin/mysqld –defaults-file=/etc/my.cnf

LimitNOFILE=5000

 

Then you can: systemctl start mysqld