Status file and log file _ MySQL

Source: Internet
Author: User
Status file and log file tip: the MySQL data directory also contains many status files and log files whose names are named after the host name and related suffixes.


The MySQL data directory contains many status files and log files whose names are named by the host name and related suffixes.

The following is a description list of these files:

Table 3.1. status files and log files

File type default name file content
Process ID file hostname. pid MySQL server process ID
General query logs hostname. log connection/disconnection events and query information
Slow query log hostname-slow.log records command information that has been queried for a long time
Change the log hostname. nnn to create or modify the query command information for the data table structure and content
Binary representation of query commands that create or modify data table structures and content in the binary change log hostname-bin.nnn
Binary change log index file hostname-bin.index in use binary change log list
The error log hostname. err records the "start/stop" events and exceptions.

The change log and binary change log are mainly used for the crash recovery of the MySQL database server. because the change log records all changes to the database, event replay can be performed. For more information, see the relevant database backup and recovery section. For change logs, we can use the -- log-long-format option to allow it to record related events in an extended manner. Extended Mode can record who sends the query and when the query is sent. This allows us to better understand the operations of the client. The log records all the operations of the query command, which may contain some sensitive information. Therefore, we need to ensure the security of log files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.