I am migrating a Magento installation (1.9.2) from my localhost to my cloud server on Digital Ocean.

Here is where I am at: (I copied some of these steps from another thread)

  • zipped and transferred all files from localhost to cloud server
  • imported the mysql database
  • edited the app/etc/local.xml to connect to the cloud mySQL DB
  • tweaked core_config_data table in phpmyadmin and replaced 2 values with new URL (IP address)
  • cleared var/cache, var/session, var/report, var/log
  • checked all file and folder permissions.

(I have removed my server IP address for privacy)

After all that I receive the following error:

a:5:{i:0;s:78:"SQLSTATE[HY000] [2003] Can't connect to MySQL server on '111.222.333.444' (111)";i:1;s:1511:"#0 /var/www/html/magento/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
/var/www/html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
/var/www/html/magento/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
/var/www/html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
/var/www/html/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
/var/www/html/magento/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
/var/www/html/magento/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
/var/www/html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage_Core_Model_Resource->getConnection('core_setup')
/var/www/html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup')
/var/www/html/magento/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
/var/www/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
/var/www/html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
/var/www/html/magento/index.php(83): Mage::run('', 'store')

Here is my local.xml file (IP Address edited):

            <date><![CDATA[Thu, 26 Nov 2015 20:09:46 +0000]]></date>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>

What could be wrong?

closed as off-topic by Fabian Schmengler, 7ochem, Marius Dec 14 '15 at 16:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced OR seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Fabian Schmengler, 7ochem, Marius
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hard to say without knowing the setup, teh configuration does not look wrong. Does the database magento_ultimo actually exist? – Fabian Schmengler Dec 14 '15 at 14:49
  • Hi,I managed to quickly find the issue. The IP address was not needed in the local.xml file. I simply reverted the IP address to say localhost...and it worked. Well..it showed me my shopfront in a very mutated form, lacking all formatting/CSS/anything - I think there are some template issues from the migration :/ – Damo Dec 14 '15 at 15:11
  • On a related note, I now a 404 error on all pages, however I do see some of the page text content (badly formatted menu items and product fields...) however the overall page template is missing as well as all formatting styling and images. Any idea, what could be going on? It seems like all magento folders have been copied correctly.. Thanks, Damien – Damo Dec 14 '15 at 15:36
  • make sure, var and media are writable by the webserver user and that URL rewrites are enabled – Fabian Schmengler Dec 14 '15 at 15:37
  • Thanks @fschmengler. I checked those directories. All good. Two more symptoms (1) The headers and footers seem to be rendering fine on all pages (2) I am unable to access the Magento Admin console as I see the same 404 error page (that looks like my storefront)...so possibly there is a URL redirect issue? or an attribute that I missed? Any thoughts? Many thanks! – Damo Dec 14 '15 at 16:39