2
I'm trying to figure out how to turn on/off the MySQL 5.1.48 general query log, without restarting the server (not an option in production right now). In my test environment, it's not working.
According to this, I should be able to say:
set global general_log = 'OFF';
which does work: the general query log no longer has queries added to it. But when I do:
set global general_log = 'ON';
it complains that:
ERROR 1146 (42S02): Table 'mysql.general_log' doesn't exist
(true, it doesn't), and the log adds a standard startup header ("mysqld, Version: 5.1.48..."), and then nothing else.
Can I just go to another MySQL database with the same platform/version, copy its show create table mysql.general_log;
, and run it here? Is that safe, or is this symptomatic of deeper problems? And am I supposed to have to do that when I turn on the general query log? I don't see anything about that in the manual.
Wow, that worked magic for me. I did
mysql_upgrade -p --force
and then aservice mysql restart
and now turning general_log on and off works like it should. Thank you very much Matt! – bawkstoo – 2011-04-13T20:09:49.897