Dec
20
2009
Configure Logrotate To Rotate And Flush MySQL Logs Without A Password
Posted by alex in InsightsIf you have the resources (CPU + RAM) available on your server then its can be a great troubleshooting tool if you enable MySQL logging which includes server messages, SQL query logs, and slow query logs. If you do not have the resources I would suggest only enable minimal logging such as only server messages and the slow query log since enabling all queries to be written to a file can become expensive rather quickly. Below I discuss enabling three different types of MySQL logging, adding a MySQL configuration file to logrotate, and configuring root to run mysqladmin commands without having to type the password out each time.
Tags: .my.cnf, endscript, flush-logs, log, logrotate, logrotate.conf, missingok, mysql, mysql.log, mysqladmin, mysqld, mysqld.log, nocompress, postrotate, queries, slow query








Entries (RSS)