Connecting to External Database (3 posts)

  1. kuttnhaste
    Posted 10 years ago #

    I've searched on this for the last hour and haven't found anything useful. I'm getting the "Error establishing a database connection" message.

    I want to connect to my external database. I'm running wordpress locally. So I have changed the DB_HOST to my actuall mysql host.

    I had previously setup everything locally including mysql. Then I was pretty happy with everything and wanted to try developing locally but connecting to my dev mysql account.

    So I'm using something like this

    define('DB_NAME', 'mydbname');
    define('DB_USER', 'myuser');
    define('DB_PASSWORD', 'mypwd');
    define('DB_HOST', 'mysql.myhostname.com');

    Where ll the details are as they should be. I have used the setttings in ssh to connect to mysql so I know they're right.

    Am I missing something? I'm sure this can be done..

    My mysql account is with Dreamhost if that matters...


  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Very very few hosts will allow a database of theirs to connect outside of their webspace.
    It's they you need to talk to.

  3. kuttnhaste
    Posted 10 years ago #

    Ah ok, so it's to do with the fact i'm not on their server. Makes sense.

Topic Closed

This topic has been closed to new replies.

About this Topic