MySQL

MySQL Slow Query Log

Start MySQL Server: /etc/init.d/mysqld start Syntax for /etc/my.cnf in Red Hat Family Machine : [mysqld] set-variable=long_query_time=1 log-slow-queries=/var/log/mysql/log-slow-queries.log log-queries-not-using-indexes The 2nd line under [mysqld] turns on slow query log and logs all slow queries to log-slow-queries.log in the MySQL data directory. The 1st line indicates that any queries that took more than 1 seconds to execute need to be logged. The…

Continue Reading