I am trying to migrate our Magento database to another server. Here is what I have done

  1. Cloned the current VPS server to another VPS
  2. Turned off httpd in the new server that I want to be the dbserver
  3. Logged into mysql in the dbserver as root
  4. GRANT ALL ON dbname.* TO 'user'@'webserver_IP_address' IDENTIFIED BY 'password';
  5. From the webserver I was able to login to Mysql in the dbserver passing the IP address of the dbserver as the hostname
  6. Renamed local.xml and tried to re-run Magento install wizard but could not get passed the DB connection screen.

I am providing the exact username, the exact password, the only thing that change is the hostname which I am entering the IP address of the dbserver instead of localhost

How can I point Magento to use a different remote db other than localhost

closed as off-topic by Fabian Blechschmidt, Marius, Mufaddal, Keyul Shah, philwinkle Jul 17 '14 at 18:17

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 Blechschmidt, Marius, Mufaddal, Keyul Shah, philwinkle
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you can SSH get access via CLI, are you able to connect to the DB server via the command line mysql ? Also double check firewall/iptables settings. Also be sure to FLUSH PRIVILEGES dev.mysql.com/doc/refman/5.0/en/flush.html – B00MER May 12 '14 at 22:51
  • Yes, I was able to ssh and connected via mysql command line. Reading up on what to check for the firewall/iptables as regards mysql – Val Okafor May 12 '14 at 22:54
  • If you are able to connect via SSH from the web head, double check etc/local.xml, and manually wipe var/cache and try again. – B00MER May 12 '14 at 23:09

It turned out to be a typo when I granted permission, a new database was created. I re-granted permission for the correct Database and it went through.

Not the answer you're looking for? Browse other questions tagged or ask your own question.