[mysqld]
long_query_time=1
log-slow-queries=/var/log/mysql/log-slow-queries.log
long_query_time = 10
mkdir /var/log/mysql
touch /var/log/mysql/log-slow-queries.log
chown mysql.mysql -R /var/log/mysql
Blog
MySQL: Identifying Long-Running Queries
[mysqld] long_query_time=1 log-slow-queries=/var/log/mysql/log-slow-queries.log long_query_time = 10 mkdir /var/log/mysql touch /var/log/mysql/log-slow-queries.log chown mysql.mysql -R /var/log/mysql

[mysqld]
long_query_time=1
log-slow-queries=/var/log/mysql/log-slow-queries.log
long_query_time = 10
mkdir /var/log/mysql
touch /var/log/mysql/log-slow-queries.log
chown mysql.mysql -R /var/log/mysql
Note: This post may be AI-assisted and then human-edited. Editorial responsibility: Dmytro Lomaka, Kaltenkirchen.
Essential cookies are always active. Statistics, external fonts and marketing load only with your consent (GDPR).
Language, session, consent storage
Anonymous visit analytics
Google Fonts and other CDNs
Advertising pixels and trackers
Scan to open this site quickly on your phone