WordPress MySQL Database Remote Connection

August 5th, 2011 by Regaz

WordPress MySQL Remote DB Connection Set-Up




This Procedure is Particularly Useful when you want to Develop on a Local Machine and after Deploying into the Remote Server.

But this is possible only if your Host Allow MySQL Remote Access.
So before you should need to Check if your Hosting Plan dispose of such Possibility.

This is the Step-by-Step Procedure to Make this Setup.

Wordpress MySQL Database Remote Connection - Featured
  1. Enable MySQL Remote Access
        In CPanel  Databases>>Remote MySQL
        Insert your IP
  2. Check you are able to connect to Database:
         In Unix-like open a Terminal Session
    mysql -u yourMySQLUser -h xxx.xxx.xxx.xxx -p




  3.  

  4. Change settings in wp-config.php:
    define('DB_HOST', 'xxx.xxx.xxx.xxx:port');

    OR

    define('DB_HOST', 'db.domain.com:port');

    You do Not Need to Set the Port if your Connection Use the 3306Default port.

  5. Save and Test your Setup :)
(Visited 157 times, 1 visits today)
Share on Tumblr

Tags: , , , ,


Comments are disabled