Sunday, July 19, 2015

Cpanel Enable the slow query log

You would add the following to /etc/my.cnf file to enable the slow query log.
log-slow-queries=/var/lib/mysql/slow.log
After that, then do the following commands to create the file with the right ownership and file permissions:
touch /var/lib/mysql/slow.log
chmod 660 /var/lib/mysql/slow.log
chown mysql:mysql /var/lib/mysql/slow.log


No comments:

Post a Comment