magento SQLSTATE[HY000] [2013] Lost connection to MySQL server
Tech-Today

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 file for mysql app/etc/config.xml

So all I did was make sure that the value in the 2 database connection settings are the same.

Find these lines and replace there values:


<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[database_name]]></dbname>
<active>1</active>
</connection>
</default_setup>





- 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...

- Enable Maven To Push Artifact To Artifactory
This is done in ubuntu 11.10 Open /home//.m2/settings.xml or create the file if it does not exists.Paste the ff code: <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...

- 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 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>...



Tech-Today








.