Watch slow queries on MySQL

First login as root on the command line to MySQL:
mysql -u root -p mysql

Enter your mysql root password.

Set the log slow queries variables:

SET GLOBAL slow_query_log = 'ON';

Verify your variables are set properly:


You should have something like this:

slow_query_log       | ON
slow_query_log_file  | /var/lib/mysql/gp1-slow.log

Now you can check the log file to identify your slow queries.

< / >