Mac OS X MySQL Query Log not writing

I have my my.cnf with this setting

[mysqld]
general_log =1
general_log_file = /var/log/mysqld.log
query_cache_type=1
query_cache_size=64M

also had it before set to

[mysqld]
log = /var/log/mysqld.log
query_cache_type=1
query_cache_size=64M

I know I had this working at one point but when I went to go tail it today I noticed it wasn’t working. I have the file in /var/log and this is the permissions

-rw-r–r– 1 _mysql wheel 0 Jul 26 10:27 mysqld.log

It was

-rw-r–r– 1 root wheel 0 Jul 26 10:27 mysqld.log

Answer

I have binary logging enabled on OS X using a standard MySQL 5.5.15 package. It’s logging to its default location (which is its own datadir, in this case /usr/local/mysql/data) Permissions are:

-rw-rw----     1 _mysql  wheel    5.6M  2 Feb 08:08 mysql-bin.000018

The folder itself is:

drwxr-xr-x    75 _mysql  wheel    2.5K  2 Feb 08:12 ./

If it’s having trouble opening your log file, you should look in the error log which will tell you about any startup errors.

Attribution
Source : Link , Question Author : dan.codes , Answer Author : Synchro

Leave a Comment