0

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?

1
  • If your MySQL error log has any significant volume, the problem is related to the errors appearing in the log. Look at resolving those - MySQL error logs even on production systems can go months and only have 1-2k bytes of data in them.
    – danblack
    Aug 22, 2018 at 23:39

2 Answers 2

1

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

man logrotate for more info.

1
  • 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, 2013 at 5:13
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .