slow_query_log = 1
slow_query_log_file = /ebill-slave-1/mysql-logs/mysqld-slow.log
long_query_time = 6000
log-queries-not-using-indexes
log-slow-admin-statements
max_connections=13000
..and
cd mk-myacct-dbslave-2/ebill-slave-2/mysql-logs >
touch mysqld-slow.log
chown mysql:mysql mysqld-slow.log
chmod 755 mysqld-slow.log
chmod 755 seems to be too much, 644 would be better.
ReplyDeleteThe slow logs can be consumed by mysqldumpslow or pt-query-digest from the Percona Toolkit.
For 5.6 I like to use performance_schema (with SYS) instead of the slow log.
http://dev.mysql.com/doc/refman/5.6/en/mysqldumpslow.html
http://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html
https://github.com/MarkLeith/mysql-sys