I am new in Magento 2.2 and facing MySql slow queries issue.I want to know how to use/install MySqltuner in Magento 2. And where is the location of my.cnf file?

Need help to fix this issue.


  • Please post complete TEXT report from mysqltuner.pl (perl script) for assistance with my.cnf [mysqld] section tuning suggestions. Commented Oct 21, 2019 at 17:00

1 Answer 1


Below are some main Magento2 MySQL Recommeded Configurations.

  • Magento2 requires Above MySQL 5.6.x.
  • Magento2 version 2.1.x and later are compatible with MySQL 5.7.x.
  • Magento2 uses MySQL database triggers to improve database access during reindexing.
  • If you expect to import large numbers of products into Magento, you can increase the value for max_allowed_packet that is larger than the default, 32MB.

For more details Refer this devdocs link - https://devdocs.magento.com/guides/v2.3/install-gde/prereq/mysql.html

Location of my.cnf File are:

  • How to go in etc location? Commented Sep 19, 2019 at 12:48
  • Use SSH connection for your OS and cd /etc to 'change directories to destination needed. Use mysqltuner.com for download of PERL script to run mysqltuner.pl to retrieve analysis of your instance information to assist with tuning. All reommendations to be EVALUATED. Some could be WRONG. Commented Sep 30, 2019 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.