Question

Does anybody know when the mysql slow log file delete slow query records?

based on my daily observation. The log file starts at 7am. I have searched for this but nothing answers me clearly. My server version if 5.6.14. Thank you.

Était-ce utile?

La solution

This is probably done by your log rotation software. On my Ubuntu machine its defined in /etc/logrotate.d/mysql-server.

logrotate is run daily by a cron job. Take a look in /etc/crontab. In my case I have the following:

25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

So daily jobs get run at 6:25AM.

I also have a file /etc/cron.daily/logrotate which configures log rotate as a daily job.

Most Linux installations would have something similar. If you're running on Windows I'm afraid I have no idea.

Autres conseils

Never. It just grows and grows. All the more reason to fix the slow queries.

(Or you could do something to delete the file. Of course it will come back.)

Licencié sous: CC-BY-SA avec attribution
Non affilié à dba.stackexchange
scroll top