Forums

Remote database connection issue (2 posts)

  1. Subtracting
    Member
    Posted 3 years ago #

    I'm trying to install wp and i had to set up a database through a seperate server (cPanel rather) and i can't get the install script to even connect. I get the message "Unable to connect to database" i probably have the config.php file wrong or something but i'm not sure what should be where...can anyone help me!?

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Typically, in cPanel the DB_HOST is localhost.

    You actually assign the database name, database user, and password.

    Database name and password is usually prepended with your account name so if subtrac is your account name then subtrac_wpdata would be an example of a database name and subtrac_wpdbuser would be an example of a user name.

    Now, if your database server is being accessed from somewhere different that your cPanel 'host' you will need to ask your host for the IP address of your database server, and use that IP address in place of localhost for the DB_HOST value.

Topic Closed

This topic has been closed to new replies.

About this Topic