Title: Error establishing database connection
Last modified: August 19, 2016

---

# Error establishing database connection

 *  [jamesd127](https://wordpress.org/support/users/jamesd127/)
 * (@jamesd127)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-5-2/)
 * I set up database and user, I type the url
 * [http://blog.jim.com/wp-admin/install.php](http://blog.jim.com/wp-admin/install.php)
 * And get the response
 * Error establishing a database connection
 *  * Are you sure you have the correct username and password?
    * Are you sure that
   you have typed the correct hostname?
 * Yes, I am sure I have the correct username and password.
 * I went to cpanel/MySql Databse, created a database and user, added the user to
   the database, whereupon cpanel/Mysql displayed:
 * Database Users
    echeque_Wordpress echeque_word
 * and my wp-config.php file says:
    define(‘DB_NAME’, ‘echeque_wordpress’); // The
   name of the database define(‘DB_USER’, ‘echeque_word’); // Your MySQL username
   define(‘DB_PASSWORD’, ‘EpC8Q5bg’); // …and password define(‘DB_HOST’, ‘localhost’);//
   99% chance you won’t need to change this value define(‘DB_CHARSET’, ‘utf8’); 
   define(‘DB_COLLATE’, ”);

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

 *  Thread Starter [jamesd127](https://wordpress.org/support/users/jamesd127/)
 * (@jamesd127)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-5-2/#post-703201)
 * And before anyone points out the difference between echeque_Wordpress and echeque_wordpress,
   yes I tried all possible combinations
 *  Thread Starter [jamesd127](https://wordpress.org/support/users/jamesd127/)
 * (@jamesd127)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-5-2/#post-703202)
 * Found the problem – the hostname name is not localhost.

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

The topic ‘Error establishing database connection’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 1 participant
 * Last reply from: [jamesd127](https://wordpress.org/support/users/jamesd127/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/error-establishing-database-connection-5-2/#post-703202)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
