enable slow query log in mysql

How to enable slow query log in mysqlaktivieren – bad performance logging

mysql -uroot -p
set global slow_query_log =’ON‘;
set global log_queries_not_using_indexes =’ON‘;
set global slow_query_log_file =’/var/log/mysql/slow-query.log‘;
set global long_query_time = 5;

show variables like ‚%slow%‘;

/etc/init.d/mysql restart

tailf -n 100 /var/log/mysql/slow-query.log

mysql> set global long_query_time = ‚5‘;
ERROR 1232 (42000): Incorrect argument type to variable ‚long_query_time‘

Use -> set global long_query_time = 5;

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht.

Scroll to Top