Knowledge Base
MilesWeb / Shopping Carts FAQ

How Do I Debug Magento MySQL Problems?

Approx. read time : 2 min

Unlike any other modern PHP application, Magento stores most of the information in database except the media and xml configurations. Therefore, it is useful to know some important things before debugging the Magento problems.

All the MySQL queries can be logged and examined. In order to do this, open the file ‘lib/Varien/Db/Adapter/Pdo/Mysql.php’ and modify the value of protected property $_debug to true. The value of $_logQueryTime can also be changed; this is especially helpful while debugging the slowdowns. After making the change, all the queries will be stored in the file – var/debug/sql.txt

Magento comprises of a great tool for fixing the frequent database problems. This tool needs a working Magento installation whose database is used as a reference for fixing a corrupt file.

Make sure to take the backup of your Magento database before you make any changes to it.

Consider MilesWeb Magento hosting that comprises of round the clock technical support for taking care of all the problems that you might face while using Magento.

With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.