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

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.




- How To Dump And Restore A Postgresql Database
To create a postgresql dump in linux, execute the following commands: Login as root user>su - postgres>pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname>passwordTo restore, execute: >psql -U username -f dump_username.dump dbnameOther...

- Web Development
WordpressConfigure Custom Wordpress PermalinkZencartHow to add a customize product admin fields in zencart by editing/adding extra codesJoomlaHow to install/setup/configure joomla to run in a xampp setup. This avoids the technical detail of manually installing...

- How To Connect Mysql Or Postgresql Server From Java Using Jdbc Driver
How to connect MySql or PostgreSql Server from Java using JDBC Driver I think the best answer to this is through coding: private static Connection getConnection() { Connection conn = null; try { Class.forName("com.mysql.jdbc.Driver"); //conn = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/anime",...

- Magento Sqlstate[hy000] [2013] Lost Connection To Mysql Server
I have this unusual error when I printed the error caught in Mage::run method. I've already setup my database connection settings in app/etc/local.xml, but unfortunately I still have this error. What I found out was there is another configuration...

- Magento: Cannot Add Or Update A Child Row: A Foreign Key Constraint Fails
I am in the stage of migrating my local database of magento to public when I have encountered this error. How did it happen: 1.) I use phpmyadmin3.2 to export the sql statements. 2.) In my host mysql's phpmyadmin, I have executed the dump statements....



Tech-Today








.