The general query log
All statements sent to MariaDB are logged in the general query log or general log. They are written in the same order they were received. This order is never identical to the order of execution on multithread environments (because statements often need to wait for a lock to be released). Connections and disconnections are also written to the general log.
The general log is often suitable for finding problems that are caused by the application's bugs.
The general query log depends on the
binary log format. This log will be described in Chapter 8, Backup and Disaster Recovery. While the general log is designed to be read by humans, the binary log is read by programs. A human can read its contents using the mysqlbinlog tool. This tool tracks the changes to databases and does this in different formats such as STATEMENT
(SQL statements are logged), ROW
(binary data is logged), or MIXED
(both methods can be used). The reason for this will be clear in the later chapters, but...