activating mysql logging on Mac OSX Snow Leopard
November 24th, 2011 at 9:59 am
While working on a project it may happens that you need some logging from mysql server. And if you are working on a Mac, with the native (not mac ports) mysql server you will notice that logging features are not enabled.
In order to activate them I followed these easy steps.
sudo touch /etc/my.cnf
sudo vi /etc/my.cnf
once the file is opened add the following lines
[mysqld]
log=/var/log/mysqld.log
Close and save the file.
Now you must assign right permissions to the log file, for me it worked this way
chown _mysql /var/log/mysqld.log
Now restart mysqld task
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
And you are done!