Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My MySQL enterprise server has limiting disk space for logging. Error log file increasing size day by day and difficult to limit the size of error log.

Can I Limit MySQL Error Log file size?

Is there any purge command for error log?

Can I apply Log rotation option?

share|improve this question

It use to be done by operating system.In Debian, for example, logrotate do it.

man logrotate for more info.

share|improve this answer
I does not mentioned about server or apache log. I need to rotate only mysql error log. No issue with mysql bin log. – Sathiska Jun 30 '13 at 5:13

This is my Answer,

Scheduled following command weekly basis.

mysqladmin -u xxxx -pxxxxxx flush-logs;

move old error log file into backup drive.

mv /var/lib/xxxxx.err.old /vol3/backup-export
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.