Seven types of MySQL logs

Source: Internet
Author: User

Analysis of MySQL 7 types of logs (I) Error Log ① parameter log_error: Specify the log location and name ② function (I) Error/alarm information (ii) optimization help (ii) Slow query log ① parameter log_slow_queries: specify the log location and name long_query_time: the SQL statement whose running time is less than or equal to this threshold value will not be logged as log_queries_not_using_indexes: the SQL statement without an index will be logged as log_output: specify the log output format, the default value is FILE, and the value can also be set to TABLE ② for SQL optimization (iii) Transaction Log ① parameter innodb_log_file_size: Log FILE Size innodb_log_files_in_group: the number of log files in each group innodb_mirrored: how many groups of innodb_log_group_home_dir: log Group Path ② active instance or media recovery (iv) relay log ① parameter relay-log: specify the location and name of the relay log ② act as the standby database to copy the logs of the master database to its own relay log (v) General log ① parameter general_log_file: specify the location and name of the general log general_log: 1 Enabled; 0 close ② function audit: Which account, at which time, what is done (vi) binary log ① parameter log_bin: Specify the log location and name [NOTE: In my. cnf should be log-bin, and the parameter is log_bin.] binlog_format: Specify the log format sync_binlog: 1 indicates synchronous write to disk (2) log writing (1) Restoration Based on time points (2) Copy (7) query log (1) parameter log: Specify the log name log_output: if it is TABLE, all mysql request information is recorded under MySQL database ②.

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.