Mysql Log File description

Source: Internet
Author: User
Mysql Log Files are familiar to us. The following describes mysql Log Files in detail. If you are interested in mysql Log Files, take a look. 1. Error Log ErrorLog the error log records all serious warnings and error messages during mysqlserver running, as well as detailed information about mysql startup and Shutdown

Mysql Log Files are familiar to us. The following describes mysql Log Files in detail. If you are interested in mysql Log Files, take a look. 1. Error Log records all serious warnings and Error messages during mysql server running, as well as detailed information about mysql startup and Shutdown

Mysql Log Files are familiar to us. The following describes mysql Log Files in detail. If you are interested in mysql Log Files, take a look.

1. Error Log

The error log records all severe warnings and error messages during mysql server running, as well as detailed information about each mysql startup and shutdown.

The -- log-error option is added when mysql is started. By default, error logs are stored in the data directory named hostname. err. However, you can run the -- log-error [= file_name] command to modify the Directory and file name.

Sometimes, you want to back up the error log and record it again. Use the flush logs command to back up the file ending with. old.

2. Binary Log: Binary Log & Binary Log Index

It is often said that binlog is one of the most important logs in mysql. After the record function is enabled through -- log-bin [= file_name], mysql records all queries that modify Database Data in binary format to the log file, this includes the execution time, resources consumed, and transaction information of each query. If file_name is not specified, it is recorded as mysql-bin in the data directory. ****.

Binlog also has some additional option parameters:

-- Max_binlog_size sets the maximum storage limit of binlog. When the log reaches this limit, a new file record is created.

-- Binlog-do-db = db_name parameter tells mysql to only record binlog for a database

-- Binlog-ignore-db = db_name indicates that mysql ignores the binlog of a database record.

3. update log: update log

Not supported after mysql5.0, similar to binlog, but not recorded in binary format, is a simple text format record

4. query log: query log

To query all query records in mysql, you can use -- log [= file_name] to open the log. Because all query records are large, this feature also has a significant impact on the performance after it is enabled. It is only temporarily enabled when you track certain special query performance problems. The default file name is hostname. log.

5. slow query log: slow query log

Turn on this feature through -- log-slow-queries [= file_name] and set the record location and file name, default file name: hostname-slow.log, default directory is also the data directory.

6InnoDB online REDO Log: InnoDB REDO Log

The REDO log records all the physical changes and transaction information of InnoDB. InnoDB ensures transaction security under any circumstances through the REDO log and UNDO information. The REDO logs of InnoDB are also stored in the data directory by default. You can use innodb_log_group_home_dir to change the log storage location. Use innodb_log_files_in_group to set the number of logs.
  

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.