Enable Slow Query Log in MySQL

To enable MySQL slow query login, edit my.cnf file

Add

Restart MySQL

On CentOS, the command is “systemctl retstart mysqld”. If you are using MariaDB, use “systemctl restart mariadb”.

You can use mysqldumpslow command to view slow queries.

Add a Comment

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