Title: Error with install, ref DB_HOST
Last modified: August 18, 2016

---

# Error with install, ref DB_HOST

 *  [londerwost](https://wordpress.org/support/users/londerwost/)
 * (@londerwost)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/)
 * When using /wp-admin/install.php I get the following error:
 * “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 DB_HOST. This
   could mean your host’s database server is down.”
 * I have tested the DB and it works, I can log into it just fine. I made the exact
   changes that were instructed in the installation guide. Is there something wrong
   with the code? Am I missing a step?
 * This is the code that I have with *** for the username, DB name, password, and
   IP address (not posting that on a public forum):
 * <?php
    // ** MySQL settings ** // define(‘***’, ‘wordpress’); // The name of 
   the database define(‘***’, ‘username’); // Your MySQL username define(‘***’, ‘
   password’); // …and password define(‘localhost’, ‘***’); // 99% chance you won’t
   need to change this value
 * // You can have multiple installations in one database if you give each a unique
   prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!
 * // Change this to localize WordPress. A corresponding MO file for the
    // chosen
   language must be installed to wp-includes/languages. // For example, install 
   de.mo to wp-includes/languages and set WPLANG to ‘de’ // to enable German language
   support. define (‘WPLANG’, ”);
 * /* That’s all, stop editing! Happy blogging. */
 * define(‘ABSPATH’, dirname(__FILE__).’/’);
    require_once(ABSPATH.’wp-settings.
   php’); ?>

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/#post-444508)
 * You need to swap the *** with the wordpress, username, and password.
 * So instead of define(‘***’,’wordpress’)
 * you need define(‘DB NAME’,’***’), etc
 *  Thread Starter [londerwost](https://wordpress.org/support/users/londerwost/)
 * (@londerwost)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/#post-444528)
 * Sorry I was not clear. I know this. I’m not going to post it on the forums. FOR
   THIS POST I put the *** over the username, etc…
 *  [Les Bessant](https://wordpress.org/support/users/lesbessant/)
 * (@lesbessant)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/#post-444536)
 * Which is why it didn’t work, it should look like this:
 * define(‘DB_NAME’, ‘your_database_name’);
    define(‘DB_USER’, ‘your_user_name’);
   define(‘DB_PASSWORD’, ‘your_password’); define(‘DB_HOST’, ‘your_database_server’);
 * And while it does say there’s a 99% chance you won’t need to change the server
   name from “localhost”, this does depend on your host.
 *  Thread Starter [londerwost](https://wordpress.org/support/users/londerwost/)
 * (@londerwost)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/#post-444641)
 * Now I feel silly. Thanks for the clarification!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error with install, ref DB_HOST’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [installation](https://wordpress.org/support/topic-tag/installation/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 3 participants
 * Last reply from: [londerwost](https://wordpress.org/support/users/londerwost/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/error-with-install-ref-db_host/#post-444641)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
