Posts: 10
Registered: ‎10-29-2015

Mysql binary logs

The /var/lib/mysql is running out of space probably because I have this line commented out in my.cnf:

#expire_logs_days = 10


1) Is uncommenting this line the right (recommended) thing to do?

2) If yes, can I just restart the mysqld (service mysqld restart) for this change to take effect? Or I have to restart the entire chain of services: stop CDH cluster > stop Clodera Manager Services > service cloudera-scm-agent stop > service cloudera-scm-server stop > service mysqld stop ?


Thank you.

Posts: 976
Topics: 1
Kudos: 234
Solutions: 123
Registered: ‎04-22-2014

Re: Mysql binary logs




Please consult with MySQL documentation and/or community for guidance about what is right for your MySQL deployment.

There is a great deal of information on the topic that can be identified via web search.



If you are going to restart your MySQL server, it is recommended that you shut down any services that use it first.  While it is possible that CM and CDH roles will continue to function, it is safer to shut down anything that uses your MySQL server for db storage before doing the MySQL restart.

Posts: 760
Registered: ‎05-16-2016

Re: Mysql binary logs

[ Edited ]

we had this issue , it is always good to move out the any logs from /var as it is also having lib directories. 

for us we bought some space by moving couple of services outside the /var/log directory . 

hope this helps.