Changing the Linux host name causes MySQL to fail to start and restart
MySQL cannot be restarted, shut down, started, or used. If you modify the host name, you can disable all MySQL processes and start MySQL.
Today, I saw that my host name was incorrect. So I changed it to distinguish the server. The following error occurs when I only restarted mysql:
MySQL manager or server PID file cocould not be found! [FAILED]
Starting MySQL. Manager of pid-file quit without updating fi [FAILED]
Why can't I find the PID? See the following:
Root@bkjia.com ~ # Ps aux | grep mysql
Mysql 16433 0.0 0.2 36636 5756? Sl/usr/local/mysql/libexec/mysqld -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/var -- user = mysql -- log- error =/usr/local/mysql/var/hao9goAndSecondWeb. err -- pid-file =/usr/local/mysql/var/hao9goAndSecondWeb. pid -- socket =/tmp/mysql. sock -- Ports = 3306
Root 16992 0.0 0.0 4020 704 pts/0 S + grep mysql
The original PID is still the original host name. pid, run:
Kill-9 <mysqlpid> and then service mysql start Haha to see the green OK,
[Root @ bkjia ~] # Service mysql start
Starting MySQL. [OK]
This article permanently updates link: https://www.bkjia.com/Linux/2018-02/151070.htm