Title: Error establishing a database connection at /wp-admin/install.php
Last modified: August 22, 2016

---

# Error establishing a database connection at /wp-admin/install.php

 *  [nickd123](https://wordpress.org/support/users/nickd123/)
 * (@nickd123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/)
 * I’ve setup the DB in Cpanel, changed the wp-config-sample.php to wp-config.php
   and placed my Database name, username, used localhost as my DB hostname etc. 
   into the wp-config.php then uploaded the files to my directory.
 * Now I try go to /wp-admin/install.php and it shows the 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 localhost. This could mean your host’s database
   server is down.
 * Are you sure you have the correct username and password?
    Are you sure that you
   have typed the correct hostname? Are you sure that the database server is running?
 * If i go to /wp-admin/setup-config.php it shows this error:
    Sorry, I need a wp-
   config-sample.php file to work from. Please re-upload this file from your WordPress
   installation.
 * Please Help! Thank-you.

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281238)
 * You should double-check what you have as the values for your `wp-config.php` 
   file as this is pretty much always the problem. it can be just one character 
   our, or an extra space where it shouldn’t be, but that’s enough to stop it working.
   Another potential problem is that ‘localhost’ might not work on your server as
   the hostname, soif you’re sure that what you’ve got there is corrct you should
   contact your hosting company and get them to double-check what you’ve got as 
   they’ll be able to see any problems.
 *  [LyleChamney](https://wordpress.org/support/users/lylechamney/)
 * (@lylechamney)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281244)
 * > placed my Database name, username, used localhost as my DB hostname etc. into
   > the wp-config.php then uploaded the files to my directory.
 * Another potential issue when editing the file locally is if you did so on a Mac
   using Text Edit as by default, it uses curly quotes instead of plain old ones.
   That is, of course, if you edited the quotes. You shouldn’t need to, but sometimes
   one deletes it by mistake and then it gets replaced with the “wrong kind”. And,
   as catacaustic says, that’s enough to stop it working.
 * I always use the file editor of the file manager of the hosting control panel;
   never an issue that way.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281250)
 * The text editor part is right and does happen a lot, but it will give you a different
   error message. If it’s an issue with the quotes you’ll get a PHP error and not
   the “Error establishing database connection” message.
 *  Thread Starter [nickd123](https://wordpress.org/support/users/nickd123/)
 * (@nickd123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281263)
 * I’ve double-checked multiple times, still with no luck 🙁
    I even removed all
   the files and re uploaded the files and re-created the database twice and had
   the same error.
 * I also tried to use Fantastico to install wordpress but got this error:
    Access
   denied for user ‘______’@’localhost’ (using password: NO)
 *  Thread Starter [nickd123](https://wordpress.org/support/users/nickd123/)
 * (@nickd123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281264)
 * I also looked into the database hostname and on uberglobal (hosting account) 
   on their website and in the steps for installing wordpress it says:
 * ” Start filling out the information for the database you created earlier. When
   you get to “Database Host” and “Table Prefix” it is fine to leave the default
   values as they are.”
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281316)
 * Did you contact your hosting companys support team? As I said before, if you 
   think that you are right, then they are the only ones that can tell you if you
   are wrong or if there is a server problem. Please contact them to find out.
 *  Thread Starter [nickd123](https://wordpress.org/support/users/nickd123/)
 * (@nickd123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281330)
 * Okay I will, thanks.
 *  Thread Starter [nickd123](https://wordpress.org/support/users/nickd123/)
 * (@nickd123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281331)
 * Okay I will, thanks.

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

The topic ‘Error establishing a database connection at /wp-admin/install.php’ is
closed to new replies.

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)
 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [wp-config.php](https://wordpress.org/support/topic-tag/wp-config-php/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 8 replies
 * 3 participants
 * Last reply from: [nickd123](https://wordpress.org/support/users/nickd123/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-at-wp-admininstallphp/#post-5281331)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
