Getting the general log to work in MySQL 5.6.8
- by Benjamin
I can't get the general log to work in this version of MySQL.
I added the following lines to /usr/my.cnf:
general_log = 1
general_log_file = "/var/log/mysql.log"
Then restarted the server:
[root@localhost ~]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
The settings seem to be taken into account:
mysql> SHOW VARIABLES LIKE 'general_log%';
+------------------+--------------------+
| Variable_name | Value |
+------------------+--------------------+
| general_log | ON |
| general_log_file | /var/log/mysql.log |
+------------------+--------------------+
2 rows in set (0.01 sec)
But the log is never created:
[root@localhost ~]# mysqladmin flush-logs
[root@localhost ~]# ls -al /var/log/mysql.log
ls: cannot access /var/log/mysql.log: No such file or directory
Any idea why?