1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Setup Wordpress and Link mysql database from others server

Discussion in 'Databases' started by calvynlee, Oct 26, 2014.

  1. #1
    hi All,

    I require some advice by setting up wordpress at Host A and get the Mysql database from HOST B.

    I had upload a copy of wordpress to HOST A and run the setup wizard, during the section for me to put in db, username and db host, I key in the mysql (as below) I create via HOST B's cpanel

    Database name: calvynlee_testdb
    Username name: calvynlee_testdb
    Database Host: xxx.xxx.xxx.xxx (HOST B IP address)

    Unfortunately when I hit submit, it shows error below:

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at xxx.xxx.xxx.xxx. This could mean your host's database server is down.

    • Are you sure you have the correct username and password?
    • Are you sure that you have typed the correct hostname?
    • Are you sure that the database server is running?
    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    Am I miss out any step to make it works?
     
    calvynlee, Oct 26, 2014 IP
  2. matt_62

    matt_62 Prominent Member

    Messages:
    1,827
    Likes Received:
    515
    Best Answers:
    14
    Trophy Points:
    350
    #2
    can you manually open the wp-config file and verify the settings are saved correctly? You may need to manually adjust it.

    If it stops you from installing, It might be easier to install it normally, then manually edit the file?
     
    matt_62, Oct 26, 2014 IP
  3. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #3
    Did you set up the database on Host B to accept remote connections? MySQL by default only allows connections from the local server.
     
    billzo, Oct 26, 2014 IP
    Nigel Lew likes this.
  4. calvynlee

    calvynlee Well-Known Member

    Messages:
    337
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    118
    #4
    I had manually add in the wp-config, but it does not works, because my understanding that the mysql database is empty, during the installation progress, it will build those database table. But manually attach the wp-config, will just link to an empty database. Correct me if I am wrong
     
    calvynlee, Oct 26, 2014 IP
  5. calvynlee

    calvynlee Well-Known Member

    Messages:
    337
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    118
    #5
    Added the URL into the remote database section already, but still no luck, same error messages shows :(
     
    calvynlee, Oct 26, 2014 IP
  6. HassanKhalid

    HassanKhalid Active Member

    Messages:
    158
    Likes Received:
    6
    Best Answers:
    4
    Trophy Points:
    90
    #6
    define('DB_NAME','Database Name Here');

    define('DB_USER','Database User Name');

    define('DB_PASSWORD','Password Here');

    define('DB_HOST','Ip Address');
     
    HassanKhalid, Oct 27, 2014 IP