当前位置:网站首页>MySQL auto start settings start with systemctl start mysqld

MySQL auto start settings start with systemctl start mysqld

2022-04-23 18:01:00 Shallow singing ~ happiness

1. If you use yum If you install it, you don't need to set it       use systemctl restart mysqld The following error is reported during startup :

2. Check whether the system service has mysqld

chkconfig --list

 

3.MySQL Start close add to /etc/init.d/mysqld

cp /data/mysql/support-files/mysql.server /etc/init.d/mysqld   ( /data/mysql For installation directory )

4. Then install the server as follows

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql   Copy the service file to init.d Next , And rename to mysqld

chmod +x /etc/init.d/mysqld     Give executable permission

chkconfig --add mysqld     Add service

chkconfig --list           Show the list of services

5. Here's the picture   If you see mysql Service for , also 3,4,5 All are on If you don't, you succeed , If it is off, Then type

6.#### Restart the computer
reboot

Restart and watch again mysql Whether the self start is successful

Enter the command :systemctl status mysqld

 

版权声明
本文为[Shallow singing ~ happiness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231800322916.html