Skip to content
MAMP PRO Documentation

What can I do if the MySQL server is slow?

MySQL’s slow query log records queries that take longer than a defined threshold, making it easier to identify performance bottlenecks.

To enable it, open the my.cnf template via File › Open Template and add the following lines below the [mysqld] section:

slow-query-log = 1slow-query-log-file = /Applications/MAMP/logs/mysql-slow.loglong_query_time = 1log-queries-not-using-indexes
  • long_query_time defines the threshold in seconds. Queries exceeding this value are logged.
  • log-queries-not-using-indexes logs queries that perform a full table scan, regardless of execution time.

Save the template and restart the MySQL server. The log file mysql-slow.log will appear in /Applications/MAMP/logs/ once queries have been executed.


MySQL