MySQL Advanced four--mysql log

Source: Internet
Author: User

One, log-related server variables

Mysql>show Global variables like '%log% '

+-----------------------------+----------------------------------------+

| variable_name | Value |

+-----------------------------+----------------------------------------+

| Back_log | 50 |

| Binlog_cache_size | 32768 |

| Binlog_direct_non_transactional_updates | OFF |

| Binlog_format | STATEMENT |

| Expire_logs_days | 0 |

| General_log | OFF |

| General_log_file | /root/mysql/run/mysqld/mysqld.log |

| Innodb_flush_log_at_trx_commit | 1 |

| Innodb_locks_unsafe_for_binlog | OFF |

| Innodb_log_buffer_size | 1048576 |

| Innodb_log_file_size | 5242880 |

| Innodb_log_files_in_group | 2 |

| Innodb_log_group_home_dir |./|

| innodb_mirrored_log_groups | 1 |

| Log | OFF |

| Log_bin | OFF |

| log_bin_trust_function_creators | OFF |

| log_bin_trust_routine_creators | OFF |

| Log_error | /root/mysql/log/mysqld.log |

| Log_output | FILE |

| log_queries_not_using_indexes | OFF |

| Log_slave_updates | OFF |

| log_slow_queries | OFF |

| log_warnings | 1 |

| Max_binlog_cache_size | 18446744073709547520 |

| Max_binlog_size | 1073741824 |

| Max_relay_log_size | 0 |

|                        Relay_log | |

|                      Relay_log_index | |

| Relay_log_info_file | Relay-log.info |

| Relay_log_purge | On |

| Relay_log_space_limit | 0 |

| Slow_query_log | OFF |

| Slow_query_log_file | /root/mysql/run/mysqld/mysqld-slow.log |

| Sql_log_bin | On |

| Sql_log_off | OFF |

| Sql_log_update | On |

| Sync_binlog | 0 |

+--------------------------+----------------------------------------+


Second, the type of log:

1. Query log:

(1), the query operation generated during the system query, the default is closed.


(2), the relevant server parameters:

Log

Log_output

General_log

General_log_file

2, slow query log: Query execution time longer than the specified length of the query, that is, slow query.


3. Error log:


4. Binary log: MySQL's replication feature relies on this log.


5. Relay LOG: Logs that are read and saved from the server from the primary server.


6. Transaction log:

MySQL Advanced four--mysql log

Related Article

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.