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