Log Type | Information Written to Log |
---|---|
Error log | Problems encountered starting, running, or stopping mysqld |
General query log | Established client connections and statements received from clients |
Binary log | Statements that change data (also used for replication) |
Relay log | Data changes received from a replication master server |
Slow query log | Queries that took more than |
DDL log (metadata log) | Metadata operations performed by DDL statements |
在MySQL中有许多日志,使用FLUSH LOGS
可以刷新日志。在系统运行时可以操作常规日志和慢查询日志,可以使日志生效或者失效,或是改变文件名称。可以使普通查询或者是慢查询记录在表中或者是文本文件中