WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (5 posts)

  1. sophiePODZ
    Member
    Posted 1 year ago #

    Hi, I am new to wordpress and am in need of some help - PLEASE!

    I have installed and uploaded wordpress to my site (which i am doing for a friend). I followed the famous 5-minute install and now i am at part 6, the final stage i am getting this message:
    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 you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    I know my user name and password are correct, but i am unsure of my host. I did not change this and i kept it at localhost - please can anyone help?

    ps please you simple plain english - Thank you!!! :oD

  2. DaveCoast
    Member
    Posted 1 year ago #

    If you are using cPanel to admin your site you should have a phpMyAdmin option. Go there and look at the top of the screen (breadcrumbs) and you should see the server name which is probably localhost.

    If the site is from a shared hosting provider please be sure to prefix your database and user names with the "accountname_".

  3. Keith Burgie
    Member
    Posted 1 year ago #

    Hi Sophie,

    Where are you hosting your website?

    Did you complete steps 3 and 4 on the 5-minute install?

    3. Rename the wp-config-sample.php file to wp-config.php.
    4. Open wp-config.php in a text editor and fill in your database details as explained in Editing wp-config.php to generate and use your secret key password.

  4. sophiePODZ
    Member
    Posted 1 year ago #

    Thank you for the quick replies!

    The website is hosted at hardlink hosting (i had no say in this). I did complete all the steps, but when completing step 6 that is when i get the error message. i had tried changing to url and ip address, but all had the same message.

    I see now that i need to create the database in cpanel login - way over my head, but trying anyway. As my friend already has a site, will creating the database cause the current site to fail? I have uploaded the wordpress site to a subdirectory in hope that will not cause any issues either.

    Any pointers will be much appreciated!

  5. DaveCoast
    Member
    Posted 1 year ago #

    Creating another database will not cause the current site to fail.

    Not sure if you are planning on having both sites on the same hardlink hosting account but please note that you can only have one site per URL (mydomain.com). A couple of option to consider include:
    1. a sub-domain - subdomain.mydomain.com (just does the redirect to the subdirectory)
    2. manually entering the subdirectory - mydomain.com/subdirectory

    The video at the end of this post shows (among other items) how to complete the database tasks in cPanel. WordPress 3.5 Install Post

Topic Closed

This topic has been closed to new replies.

About this Topic