The MySQL server is capable of producing a number of useful log files:[5]

  • Error

  • Query

  • Binary

  • Slow query

MySQL produces the error log if you use mysql.server or safe_mysqld to start MySQL. You can enable any or all of the others if you wish. By default, MySQL writes the log files to the data directory.

[5] Old versions of MySQL support another kind of log, the update log. This log has been made obsolete by the binary log. If you are still using the update log, we recommend that you switch to the binary log.

Get Managing & Using MySQL, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.