Friday, August 5, 2011

How to Setup Wordpress with Remote MySQL Database Access

If you are trying to Develop on Local machine and Use the Remote Hosted MySQL Database try to Follow this Procedure to Enable MySQL Remote Access by Wordpress:

  1. Enable MySQL Remote Access
    • On CPanel Go:
       Databases >> Remote MySQL
      Then Insert your IP
    • On Amazon Ec2:
      On Security Group Open the 3306 Port
      Then Create a User with Credential to Login from Net...
      Example:
      GRANT ALL PRIVILEGES ON *.* TO bob@’%’ identified by “yourpasswordhere”;

  2. Check if you are able to Cnnect to Database from Terminal:

    mysql -u yourMySQLUser -h xxx.xxx.xxx.xxx -p
  3. Change settings in wp-config.php:

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

    (Default port: 3306)

2 comments:

  1. ha! It worked!!

    I think its up to the server, too, isn't it? If they will allow that?

    ReplyDelete

  2. Hello,

    we provide affordable and result-oriented SEO services, please give a chance to serve you.


    Thanks
    Admin: E07.net

    ReplyDelete