Title: Problem Installing On LocalHost &#8211; MAMP
Last modified: September 9, 2016

---

# Problem Installing On LocalHost – MAMP

 *  [jamesthemonkeh](https://wordpress.org/support/users/jamesthemonkeh/)
 * (@jamesthemonkeh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-installing-on-localhost-mamp/)
 * Hello
 * I am trying to install WordPress on a localhost using MAMP.
 * I am receiving 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 [http://localhost:8888](http://localhost:8888).
   This could mean your host’s database server is down.
 * I am running MAMP though I had to change the port to 8888 from the preferred 
   80.
 * This is the first time I have done anything like this so am very much a beginner–
   if anyone could kindly push me in the right direction, that would be appreciated.
 * Kind regards
    James

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

 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-installing-on-localhost-mamp/#post-8166117)
 * >  we can’t contact the database server at [http://localhost:8888](http://localhost:8888).
 * If that message is indicating that you have used “locahost:8888” in your wp-config.
   php file; Example:
 *     ```
       /** MySQL hostname */
       define( 'DB_HOST', 'localhost:8888' );
       ```
   
 * Try changing it back to..
 *     ```
       /** MySQL hostname */
       define( 'DB_HOST', 'localhost' );
       ```
   
 * ..and see if that makes any difference. Port 8888 is for the web server, and 
   won’t apply to the MySQL location. “localhost” should suffice.
    -  This reply was modified 9 years, 9 months ago by [Clayton James](https://wordpress.org/support/users/claytonjames/).
    -  This reply was modified 9 years, 9 months ago by [Clayton James](https://wordpress.org/support/users/claytonjames/).
    -  This reply was modified 9 years, 9 months ago by [Clayton James](https://wordpress.org/support/users/claytonjames/).
 *  [Learn WP Basics](https://wordpress.org/support/users/learnwpbasics/)
 * (@learnwpbasics)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-installing-on-localhost-mamp/#post-8166636)
 * Have a look at this post that I answered the other day 🙂
 * [https://wordpress.org/support/topic/database-connection-error-in-installation-with-mamp-on-dell-pc-windows10/#post-8161697](https://wordpress.org/support/topic/database-connection-error-in-installation-with-mamp-on-dell-pc-windows10/#post-8161697)
 *  Thread Starter [jamesthemonkeh](https://wordpress.org/support/users/jamesthemonkeh/)
 * (@jamesthemonkeh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/problem-installing-on-localhost-mamp/#post-8172465)
 * Thank you ever so much Learn WP Basics, this solved my issue and I can now get
   on with learning how to build with WordPress 🙂

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

The topic ‘Problem Installing On LocalHost – MAMP’ is closed to new replies.

## Tags

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

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 3 replies
 * 3 participants
 * Last reply from: [jamesthemonkeh](https://wordpress.org/support/users/jamesthemonkeh/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/problem-installing-on-localhost-mamp/#post-8172465)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
