MySQL Error Log files are missing cause The server quit without updating PID file failed to start scene

 

Today, in the process of doing mysql sniff test, intermediate restart MySQL instance, "The server quit without updating PID file" this classic error occurred.
Because the mysql sniff log files in the directory mysql instance, so deleting mysql sniff log when accidentally deleted errorlog file mysql.
So the first suspicions error arises here is mysql sniff the process of writing data in datadir MySQL instance caused various attempts to reproduce all to no avail.
Finally, a closer look at some recalled the beginning of the operation error, good with errorlog mysql seems relevant, after trying to find is restarted after deleting the MySQL errorlog, can also cause the above error


Reproduction mode as follows:
1 for the normal operation of the MySQL instance, just delete MySQL configuration file errorlog
2, restart the MySQL instance, found that: The server quit without updating PID FILE

Solution 1:
the STEP 1, manually generate mysql errorlog file, errorlog file name inconsistent with the need to keep the configuration file configuration name
step 2, modify permission MySQL-related documents, chown -R mysql: mysql

Solution 2:
1, simple and crude, MySQL directly modify the user profile, the user starts the root
2, until start MySQL instance, as part of the file owner is root, for example whenever it restarts regenerated ibtmp1 file, modify MySQL related file permissions, chown -R & lt MySQL: MySQL
. 3, modify the configuration file for the user mysql, restart the instance


Finally, why delete the mysql errorlog may lead to mysql restart when "The server quit without updating PID file "?
Check out a lot of information, understand what MySQL start-up process, the following personal speculation about
1, mysql process instance starts in start-up information to be written to the errorlog if errorlog does not exist, it fails to boot
2, at boot time as root higher root user permissions, should be able to create errorlog
3, no matter how resolve this error, be sure to modify the last owner of MySQL basedir.

 

reference:

https://www.cnblogs.com/ivictor/p/6846017.html
https://blog.csdn.net/wzl505/article/details/53322845
https://codar.club/blogs/5c2d75cca8b3b.html (too wonderful , and it should be the first link of content translation software translation above, see this sentence shocked: Many children's shoes encountered this mistake when they started mysql).

 

another:

Under MySQL 5.7 version, mysql sniff packets grasp life and death data for the current instance requested, through a variety of restart, all kinds of toss or not, has finally found mysql sniff of 5.7 does not support the
open double-edged sword, someone else's stuff, did not ask when, with up Shuangwai, we have problems, and no ability to modify the source code, can only look on in despair.
https://github.com/Qihoo360/mysql-sniffer/issues/32

Guess you like

Origin www.cnblogs.com/wy123/p/11772914.html