Why does MySQL Slow Queries Log not exist?
Solution 1:
Once you have made the changes to your my.cnf
file, you need to restart the MySQL service. Not sure what system you are on, but typically service mysqld restart
will work or service mysql restart
-- just look in /etc/init.d/
.
In addition, make sure the file is created and available on disk:
touch /var/log/mysql_slow_queries.log
chown mysql:mysql /var/log/mysql_slow_queries.log
In addition, time is not so important in databases but rather queries with no indices. Consider adding the following to your my.cnf
. Of course, restart MySQL once you do:
log-queries-not-using-indexes