I recently discovered that my general_log was turned on and it had generated a 400gb log file. OUCH.. Then I tried to turn it off.
while running I entered "SET GLOBAL general_log = OFF" and sure enough, it turned it off. Until the next restart of mysql and it was back on again!
I looked at my.cnf and there was nothing there about general_log that would have turned it on so just to be safe I added general_log=0 under the [mysqld] heading. I restarted mysql again and sure enough, general_log is on again!!!
Then I edited /etc/sysconfig/mysqld and added the --general_log=0 to the command line and restarted mysql...
> /etc/init.d/mysqld restart /etc/sysconfig/mysqld: line 10: --general_log=0: command not found Stopping mysqld: [ OK ] Starting mysqld: [ OK ]
Ok, so it complained about it but, SUCCESS the general log is finally off!! But this just isn't right.. We don't like error messages, even though it is seeing that commandline option and using it just fine.
So, three questions..
- why would the my.cnf fix not work?
- why would turning it off from within mysql not keep it off
- why would it require the command line option that it complains about but yet accepts.
I am running Server version: 5.5.30-cll on CentOS 5.9
Would appreciate any help you can give.. Googling just isn't finding answers on this one.