MySQL and general logs
general_log variable while MySQL runs.
Somehow one of my MySQL server had the variable
general_log set to 1, which is pretty anoying because the file keeps growing and growing. See the symptom below:
$ sudo lsof /var/log/mysql
Don’t forget to edit your
my.cnf and then change the value of the global variable:
mysql> SET GLOBAL general_log=0;
This might take a couple of seconds to remove the file entirely, you can still
lsof command and see the size dicreasing.
As always, I hope it helps :)