MySQL General log not working on Mac OS X [duplicate]
题
This question already has an answer here:
- Slow Queries Not Logging 1 answer
I want to log all queries to the database running on my MacBook Pro (Mac OS X 10.8.1). I created a file /etc/my.cnf
with the following content:
[mysqld]
general_log=1
general_log_file=/Users/wdb/mysql.log
I restarted MySQL and tried some queries on the mysql command line, but nothing gets logged. The file is not getting created. I also created the file myself afterwards to test with touch
, but the file remains empty.
When I check, MySQL did read my settings:
mysql> show variables like '%general_log%';
+------------------+----------------------+
| Variable_name | Value |
+------------------+----------------------+
| general_log | ON |
| general_log_file | /Users/wdb/mysql.log |
+------------------+----------------------+
2 rows in set (0.01 sec)
Is there anything else I need to do? I suppose any query I type on the command line should get logged, right?
I am using MySQL 5.5.24
没有正确的解决方案
不隶属于 dba.stackexchange