I often set up mysql query logging when I am diagnosing a problem.

In the my.cnf file, enter (or update the log parameter)

log=/path/to/logfile.log

Remember to restart the mysql service:

sudo service mysql restart (ubuntu)
sudo service mysqld restart (centos)

And, ensure that the log file has the correct permissions for mysql to write to it.

After that you can tail the file to see what’s going on:

tail -f /path/to/logfile.log

 

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.