Question
Binary log versus general query log: what does each capture, and when should each be consulted?
Answer
The binary log records database changes for replication and recovery; the general query log records client connections and statements. Consult binary logs for change history and replay; use the general log for short-lived statement troubleshooting. Applies to MySQL and MariaDB.