MySQL suddenly hung up and the service could not be started. How to restore it?

A crawler was used before hanging up, and an error of 2006-MySQL server has gone away occurred when entering the library. According to Baidu, change the my.conf file
max_allowed_packet=500M

wait_timeout=288000

After

interactive_timeout = 288000
, there is still an error. Try to restart it and find that it cannot be started after shutdown.

clipboard.png

:
clipboard.png

clipboard.png

Mar.04,2021

check the log file of mysqld first, and then locate what caused it

.
less /var/log/mysqld.log   

if the log does not report an error, it should be that the permissions of SELINUX are restricted

getenforce

Enforcing
indicates that SELinux is enabled. Just shut it down.

setenforce 0 0|1 |  

or

setsebool ftpd_disable_trans 1  

finally restart mysql.

Menu