• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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