Getting the general log to work in MySQL 5.6.8
Posted
by
Benjamin
on Server Fault
See other posts from Server Fault
or by Benjamin
Published on 2012-11-28T14:52:54Z
Indexed on
2012/11/28
17:06 UTC
Read the original article
Hit count: 269
mysql
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?
© Server Fault or respective owner