MYSQL: borrar bin_logs antiguos automaticamente

 Si te encuentras que se llena el /var/log/mysql/ con logs del MySQL y la variable expire_logs_days del my.conf no esta funcionando prueba con poner esto en el cron, cada dia por ejemplo,:

/usr/bin/mysql -e “PURGE MASTER LOGS BEFORE DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY)”

Espero te solucione el problema como a mi.

Bugs MySQL: nº 28238
Doc: 5.2.3. The Binary Log, 11.6.1.1. PURGE MASTER LOGS Syntax, 11.5.5.5. RESET Syntax

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Aún no hay comentarios.

Deje un comentario

(requerido)

(requerido)