• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

How to enable slow query log

K

Konstantin2

Guest
Hello, I added a line to my.cnf to log slow queries, but the log is not being created. I pointed it to /var/log/ and called it mysql-slow.log but nothing. I tried to create the file manually but it didnt save in that folder.

What am I doing wrong? (using fedora core6).
 
Create the file
Code:
touch /var/log/mysql-slow.log 
chmod 644 /var/log/mysql-slow.log 
chown root:root /var/log/mysql-slow.log

Then in the /etc/my.cnf under the [mysqld_safe] or [mysqld] section
Code:
log-slow-queries=/var/log/mysql-slow.log

if its not saving anything then perhaps you have nothing to save :)
 
Back
Top