Title: Remote database connection issue
Last modified: August 19, 2016

---

# Remote database connection issue

 *  [subtracting](https://wordpress.org/support/users/subtracting/)
 * (@subtracting)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/remote-database-connection-issue/)
 * 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!?

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/remote-database-connection-issue/#post-791442)
 * 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.

Viewing 1 replies (of 1 total)

The topic ‘Remote database connection issue’ is closed to new replies.

## Tags

 * [config](https://wordpress.org/support/topic-tag/config/)
 * [cPanel](https://wordpress.org/support/topic-tag/cpanel/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [Remote](https://wordpress.org/support/topic-tag/remote/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/remote-database-connection-issue/#post-791442)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
