Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Shopping Carts FAQ  >  How Do I Debug Magento MySQL Problems?
Top Scroll

How Do I Debug Magento MySQL Problems?

 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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.