magento moving from shared hosting to localhost and VPS

May 20, 2015 616 views
Control Panels MySQL Apache

After move I cant get this work. I am getting error:

Still trying to connect to '' but the local.xml has host: localhost. cache and session folder is empty. htaccess file is default. can you help me ? I am using Ubuntu with ISPconfig Cpanel and Apache

a:4:{i:0;s:80:"SQLSTATE[HY000] [2003] Can't connect to MySQL server on '' (110)";i:1;s:2613:"#0  ......

my local.xml is:


so I dont understand why wants to connect to ''. var and cache is empty

1 Answer

It seems that Magento 1.x versions will in fact load any file from the app/etc/ with the .xml file extension. So there is likely a backup of your old configuration that is being loaded and taking precedence. This in depth post goes into some detail about how those files are loaded and interpreted:

The while loop will go through the remaining XML files and load each one. If you’ve ever accidentally copied another XML file into the app/etc folder and had weird things happen, this is the reason for that weirdness. Magento will load ANY file that ends in .xml.

Have another answer? Share your knowledge.