I try to make a mysql querys log in ubuntu and do the following (recommended for mysql 5.6+, which is the version I have):
[mysqld]
general_log = on
general_log_file=/var/log/apache2/mysql-query.log
in my my.cnf file.
When I restart the mysql service I do tests and the queries are not stored in the path that I specified. The file has 666 permissions and the owner left it in the following way:
sudo chown mysql:mysql /var/log/apache2/mysql-query.log
Then I enter mysql from the console and manually execute what I put in my my.cnf file.
SET GLOBAL general_log = 'ON';
and I get the following error:
ERROR 29 (HY000): File '/var/log/apache2/mysql-query.log' not found (Errcode: 13 - Permission denied)
Why? It is assumed that the file already has permissions. I need help.