Title: Error connecting database
Last modified: August 19, 2016

---

# Error connecting database

 *  Resolved [akhilp](https://wordpress.org/support/users/akhilp/)
 * (@akhilp)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/)
 * I have uploaded wp. And filled wp-config.php. But when I enter [http://dailytricks.co.cc/wp-admin/install.php](http://dailytricks.co.cc/wp-admin/install.php),
   a message “Error establishing a database connection” displays. Database name,
   username and password….all are correct. I suspect “DB_CHARSET, DB_HOST, DB_COLLATE”
   as the culprits. I use hostbot.com as my webhost.
 * Please help me.

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901181)
 * The DB_CHARSET and DB_COLLATE will not cause that problem.
 * Likely it is the DB_HOST, DB_USER, DB_PASSWORD or DB_NAME. If you don’t know 
   the DB_HOST check with your hosting company.
 *  Thread Starter [akhilp](https://wordpress.org/support/users/akhilp/)
 * (@akhilp)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901183)
 * Hello, Please tell me about other possible reasons for this problems. I will 
   also contact my webhost.
 * But….
    I have another site hosted on the same webhost, for which on clicking 
   subdirectories will give 404-not found page. eg: vidblades.co.cc/join
 * For that, DB_Host is ‘localhost’.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901187)
 * Well then ‘localhost’ seems to be the correct value for DB_HOST. I would make
   sure your DB_NAME, DB_USER, and DB_PASSWORD, are correct, and that the DB_USER
   has full privileges for that database (DB_NAME).
 * Of course the database server could be down…but most times it is something incorrectly
   specified in wp-config.php or the database user doesn’t have the proper rights.
 *  Thread Starter [akhilp](https://wordpress.org/support/users/akhilp/)
 * (@akhilp)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901188)
 * I deleted the first DB and DB user that I have created and the created another
   DB and DB user. But the problem is still there…
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901191)
 * are you using 000webhost?
    if so, the db host is NOT localhost
 *  Thread Starter [akhilp](https://wordpress.org/support/users/akhilp/)
 * (@akhilp)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901195)
 * I am using “hostbot” as my webhost.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901202)
 * 1. Create your database.
 * 2. Create your user.
 * 3. Assign privileges for your user to that database.
 * Assuming your login name with hostbot is akhilp and you want a database called
   wpdb, your DB_NAME will be akhilp_wpdb. If you create a user call wpuser, then
   your DB_USER will be akhilp_wpuser.
 *  Thread Starter [akhilp](https://wordpress.org/support/users/akhilp/)
 * (@akhilp)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901211)
 * Yes i understand. I know that. I am sure that what I entered are correct.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901232)
 * Okay, I created a hostbot account. My login is forummike.
 * Created a database, created a database user, assigned all privileges to that 
   database for that user.
 * Setup wp-config.php as:
 *     ```
       define('DB_NAME', 'forummike_wpdb');
       define('DB_USER', 'forummike_wpdbuser');
       define('DB_PASSWORD', 'xxxx');
       define('DB_HOST', 'localhost');
       ```
   
 * Successfully installed WordPress 2.6.3.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901241)
 * Just as a note, I also upgraded that installation to the WordPress 2.7 beta manually
   following the directions at [Upgrading WordPress Extended](http://codex.wordpress.org/Upgrading_WordPress_Extended).
 * But, the auto upgrade feature in 2.7 DOES NOT work on this host, even if you 
   provide the FTP information. Also 2.7 plugin installation process doesn’t work
   so plugins need to be installed the old way.

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

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

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 10 replies
 * 3 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/error-connecting-database/#post-901241)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
