Friday, May 20, 2011

MySQL Logging

Getting MySQL logging turned on in OSX turned out to be rather time-consuming.

Some key sticking points were working out that the mysql config was in /etc/my.cnf and that my attempts to restart the MySQL server were actually being ignored. It was not until I killed all the mysql processes and then "started" them again that the logging started working.

I found various helpful posts:

http://serverfault.com/questions/71071/how-to-enable-mysql-logging

Entries in the MySQL documentation:

http://dev.mysql.com/doc/refman/5.0/en/query-log.html

However part of the problem was that although in principle logging can be turned on and off from within the running MySQL instance, there is a bug in 5.0 that prevents this, and although it has been fixed in 5.1, I was unclear about how to upgrade. My previous attempt at getting ports to start working again after my transition to Snow Leopard had ending up installing a completely new instance of MySQL in a new location and with no access to my old data.

No comments: