Considerations when enabling full log query in MySQL 5.6
Today, because I want to query the call of an SQL statement, I started the full query log in production and thought that I only need to write it like this in my. cnf:
Log =/home/logs/mysql. log
However, Starting MySQL. ERROR is reported during restart! The server quit without updating PID file (/home/data/mysql // localhost. localdomain. pid) Error
At first, I thought it was a permission issue. After modifying the/home/logs/mysql. log permission, I still couldn't do it. I just commented out the newly added code and started mysql normally.
I checked it online and found that the above situation is the same as what I encountered. I re-configured it according to the above, that is, in my. the following two lines of code are added to [mysqld] In cnf:
General_log = ON
General_log_file =/home/logs/mysql. log
After saving the logs, restart and check that the logs can be started normally, and all query logs and update logs can be recorded normally.
This article permanently updates the link address: