Title: Local Install Database Connection Problem
Last modified: August 19, 2016

---

# Local Install Database Connection Problem

 *  Resolved [sheperdydodah](https://wordpress.org/support/users/sheperdydodah/)
 * (@sheperdydodah)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/)
 * I am doing a first time LOCAL install on my laptop for development purposes and
   have done the “famous 5 min install”
 * However when I try and run 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 am runnign WAMP and my config file looks like this….
 * ‘/** The name of the database for WordPress */
    define(‘oldbellwpres’, ‘putyourdbnamehere’);
 * /** MySQL database username */
    define(‘root’, ‘usernamehere’);
 * /** MySQL database password */
    define(”, ‘yourpasswordhere’);
 * /** MySQL hostname */
    define(‘localhost’, ‘localhost’);
 * /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’,‘
   utf8’);
 * /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’,”);‘
 * I can see the database oldbellwpres in mysql and have tried localhost:8889 as
   the connection
 * I have never set a password on the databse – so assume its null – but can’t find
   where to change that to something else?
 * Any ideas? specifically
 * 1 – how do I know the database servier is running
    2 – how do I chenge the passoerd
   on the database 3 – the magic words to make it work!!
 * Cheers
 * Sheperdydodah

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

 *  [wordprest](https://wordpress.org/support/users/wordprest/)
 * (@wordprest)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/#post-1289557)
 * try to indicate “root” as username and no password as ” .
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/#post-1289620)
 * If you can see the database, mysql is probably running. But see [Setting up a WAMP Server by hand « puremango.co.uk](http://www.puremango.co.uk/2009/01/wamp_97/)
   for command line prompts to be sure myqsl is running.
 * Different solutions to changing passwords: [ – PHP, Apache, MySQL, Windows : WampServer](http://www.wampserver.com/phorum/read.php?2,14143).
 *  [nabtron](https://wordpress.org/support/users/nabtron/)
 * (@nabtron)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/#post-1289738)
 * [@sheperdydodah](https://wordpress.org/support/users/sheperdydodah/), your mysql
   is working fine and the server is setup correctly too. However you have made 
   mistakes while editing the wp-config file settings that you posted above. Please
   follow this to correct them and every thing will work perfectly
 * This is the code that you posted:
 * >  ‘/** The name of the database for WordPress */
   >  define(‘oldbellwpres’, ‘putyourdbnamehere’);
   > /** MySQL database username */
   >  define(‘root’, ‘usernamehere’);
   > /** MySQL database password */
   >  define(”, ‘yourpasswordhere’);
   > /** MySQL hostname */
   >  define(‘localhost’, ‘localhost’);
   > /** Database Charset to use in creating database tables. */
   >  define(‘DB_CHARSET’,‘
   > utf8’);
   > /** The Database Collate type. Don’t change this if in doubt. */
   >  define(‘DB_COLLATE’,”);‘
 * simple replace this part of code with the following one and it should work,
 * >  ‘/** The name of the database for WordPress */
   >  define(‘DB_NAME’, ‘oldbellwpres’);
   > /** MySQL database username */
   >  define(‘DB_USER’, ‘root’);
   > /** MySQL database password */
   >  define(‘DB_PASSWORD’, ”);
   > /** MySQL hostname */
   >  define(‘DB_HOST’, ‘localhost’);
   > /** Database Charset to use in creating database tables. */
   >  define(‘DB_CHARSET’,‘
   > utf8’);
   > /** The Database Collate type. Don’t change this if in doubt. */
   >  define(‘DB_COLLATE’,”);‘
 * The issue was that while editing the wp-config file, you entered the values in
   wrong position, have a look at both above, wrong and correct settings and you
   will get an idea.
 *  Thread Starter [sheperdydodah](https://wordpress.org/support/users/sheperdydodah/)
 * (@sheperdydodah)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/#post-1289762)
 * Thanks a lot Nabtron – all up and running sweetly!!!

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

The topic ‘Local Install Database Connection Problem’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 4 participants
 * Last reply from: [sheperdydodah](https://wordpress.org/support/users/sheperdydodah/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/local-install-database-connection-problem/#post-1289762)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
