MySQL four types of logs: Error log, General query log, Binary log, Slow query log

Source: Internet
Author: User

MySQL Server has four types of logs--error log, General Query log, Binary log, and Slow query log.

The first one is the error log, which records some of the mysqld errors. The second is the general query log, which records what MYSQLD is doing, such as the connection and disconnection of the client, and the logging information from each SQL statement of the client, which is very useful if you want to know exactly what the client is transmitting to the server, but it is very effective. The fourth is a slow query log, logging some of the slow query SQL statements-This log is very common, mainly for developers tuning.

The remaining third is Binlog, which contains events that describe changes to the database, such as building tables, data changes, etc., as well as potential changes, such as the delete from ran where bing = luan fact that a piece of data has not been deleted. Unless you use row-based logging, all SQL Statement that change data are included.

Then Binlog has two important uses--replication and recovery. such as master-slave table replication, and backup restore what.

There are two common estimates:

1. Binlog: Record data before and after MySQL change (including INSERT, UPDATE, DELETE)

2. gennerallorg: Records all the original SQL statements executed on the MYQL database: (SELECT, INSERT, UPDATE, DELETE)

Reference:

http://blog.51cto.com/linuxboys/1605899

1190000003072963 (the above content is transferred from this article)

Http://www.jb51.net/article/69301.htm

MySQL four types of logs: Error log, General query log, Binary log, Slow query log

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.