RGriffiths RGriffiths - 10 months ago 62
MySQL Question

Enabling mysql slow query log using XAMPP 5.6.21

I have looked at many similar questions to this but I can't seem to find the answer. I would like to set up the

slow query log
for my
database. I have seen many answers saying I should access the
command line tool. I am not sure exactly how to find this tool but I tried accessing it by going to:

c:/xampp/mysql/bin/mysql -u root -p -h localhost

But here I get MariaDB, which seems to be different from any other answers/tutorials I have seen before. Typing in:

set log_slow_queries = ON;

gives me the error

ERROR 1193 (HY000): Unknown system variable 'log_slow_queries'

Any help here much appreciated.

SET GLOBAL slow_query_log=1;

See our docs page we wrote up Here