Error establishing a database connection- but I am the host! (2 posts)

  1. gtdane26
    Posted 3 years ago #

    I am trying to set up WordPress on my computer, but it seems to be having trouble connecting to the database. I have a new Mac Mini, and it is a server. I'm not sure if I need to change the ports.. or change something in my server configuration to get my web stuff working, but I enabled web services on my server.

    I also downloaded MAMP, and that is up and running.

    I keep getting caught at that error notice. Whenever I manually edit the wp-config-sample file, and rename it wp-config, it doesn't pop up the WordPress installation at all and seems to not be able to load it. So then I try and keep the wp-config-sample file as is, and fill out the boxes that the WordPress installation prompts me with, giving the info I set up in MAMP's start page, with the host as 'localhost' since it's my own computer, and I get that error.

    I hope this isn't too confusing and would really appreciate any direction.

  2. Tara
    Volunteer Moderator
    Posted 3 years ago #

    Error connecting to your database is common, but it isn't necessarily a problem with wordpress itself.

    - double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.
    -Then check that you don't need to change the database host from "localhost" to something else.
    -Check you have actually created a database with the same database name as is in your wp-config.php file.
    -Last, but not least, if all that information is correct your database probably has a problem with it.

    There are also many threads on this topic on these forums: http://wordpress.org/search/Error+establishing+a+database+connection?forums=1

Topic Closed

This topic has been closed to new replies.

About this Topic