Title: Creating connection with database
Last modified: August 15, 2018

---

# Creating connection with database

 *  [spadejac000](https://wordpress.org/support/users/spadejac000/)
 * (@spadejac000)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/creating-connection-with-database/)
 * I’m trying to install wordpress locally, however, I’ve been running into a lot
   of issues starting with this page:
 * “Before getting started
    Welcome to WordPress. Before getting started, we need
   some information on the database. You will need to know the following items before
   proceeding.
 * Database name
    Database username Database password Database host …”
 * So I update my wp-config-sample.php file by putting my DB name: ‘learningWordPress’,
   DB username: ‘root’, DB password: ‘root’, and DB host: ‘localhost:3306’ (It’s
   that port because if I go to xamp and click config, service and portsettins, 
   and then MySQL, it says it’s running on mainport 3306).
 * then I inputed all that information to install wordpress and I get an error establishing
   database connection.
 * Then I found somewhere that you’re supposed to rename the wp-config-sample.php
   file to wp-config.php. However, when I did that, I got this error:
 * ‘Sorry, I need a wp-config-sample.php file to work from. Please re-upload this
   file to your WordPress installation.’
 * Then I tried to just have both files ‘wp-config-sample.php’ and ‘wp-config.php’
   and that did not work either. Are there any experts out there who know how to
   solve these issues?

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

 *  [abletec](https://wordpress.org/support/users/abletec/)
 * (@abletec)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/creating-connection-with-database/#post-10594551)
 * Hello, spadejac000 & welcome.
 * The file needs to be called wp-config.php. Please try eliminating the port number,
   as it should work w/o it. It should be placed in the folder where your WordPress
   is installed.
 * Have you created your WordPress database yet in phpMyAdmin or the MySQL command
   line? You’ll need to do that first.
 * Please let us know whether or not that helps.
 *  [ramvijay](https://wordpress.org/support/users/ramvijay/)
 * (@ramvijay)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/creating-connection-with-database/#post-10728584)
 * hi
 * i think your fallowing stpes are wrong
    1.Download the file from wordpress.org
   2.move to xampp->ht docs 3.create the database in phpmyadmin 4.go to browser 
   type the link [http://localhost/yourfoldername](http://localhost/yourfoldername)
   5.Database name Database user root Database pwd EMPTY Database localhost 6.finish
   the next step. 7.then login _[ [Signature moderated](https://make.wordpress.org/support/handbook/forum-welcome/#avoid-signatures)]_
   Thanks
    -  This reply was modified 7 years, 8 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).

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

The topic ‘Creating connection with database’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [ramvijay](https://wordpress.org/support/users/ramvijay/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/creating-connection-with-database/#post-10728584)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
