magento SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111

After I have successfully dumped my database in our hosting server, I've encountered the above error when I open the magento page.

Solution:
1.) Open the file, app/etc/local.xml, and look for the following line:


<default_setup>
<connection>
<host><![CDATA[yourhostname]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[databasename]]></dbname>
<active>1</active>
</connection>
</default_setup>


Just fill out with your host database settings.

Also, you must make changes in your database:
1.) Open your database using any tool (phpmyadmin, sqlyog, etc)
2.) Explore core_config_data table
3.) Find these path column values:
a.) web/unsecure/base_url
b.) web/secure/base_url
And change the value column to your actual hosted url.
magento SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 magento SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 Reviewed by czetsuya on Monday, August 10, 2009 Rating: 5

No comments:

Powered by Blogger.