[MySQL] Log File overview the log files described here are all files of the MySQL database and have nothing to do with the specific storage engine. The error log of MySQL is similar to alert. log of Oracle. It ends with. err by default. When DBA encounters a problem, it should first query the log to obtain the error information. The query log records all database requests. These requests are not executed correctly. Slow query log the slow query log is used to record SQL statements with a long running time. You can set this threshold value using the long_query_time parameter. By default, MySQL does not start slow query logs. You can set log_slow_queries to ON to start logs. Another parameter related to the slow query log is log_queries_not_using_indexes. this parameter is ON, indicating that if the SQL statement is not indexed, it will be recorded in the slow query log. Slow query logs are mainly used to assist DBAs in optimizing SQL statements. The binary log records the changes to all databases (SELECT and SHOW are not included). The binary file is not started by default. You need to manually specify the parameter to start it. Binary logs have the following functions: 1) recovery (recovery): When a database is recovered from a full backup file, point-in-time recovery can be performed using binary logs. 2) replication: You can use it to synchronize data from the database in real time. Enabling a binary file will affect the performance (according to the official documentation, enabling a binary file will reduce the database performance by about 1%), but considering the benefits it brings, these performance losses are acceptable.