• I am trying to install WordPress for my website based on GoDaddy. I have created a database on my local WAMP server and created a new user amruta with some privileges using phpMyAdmin.
    I have entered the same privileges in the config file but when I run the installation 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 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?

    What might be the problem behind this and how do I resolve this ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You aren’t trying to connect to your local WAMP server are you?

    Thread Starter amruta_akut

    (@amruta_akut)

    Yeah I know connecting to the localhost would be much easier. We actually want to host the site online and so wanted to install WordPress on our website domain and test it with the local database.
    Is that a wrong approach or would there be a problem somewhere else ?

    ‘localhost’ means ‘this computer’. It is a loopback address.

    You can’t connect to your local WAMP server unless your local server is available from the outside (from the internet) and has a stable IP address. I doubt that is the case.

    Thread Starter amruta_akut

    (@amruta_akut)

    Yeah I am using the loopback address and it works on the localhost. The problem arises when I want to install WordPress on the website’s host.

    But it sounds like you are trying to have the website on your host connect to your local WAMP server. You can’t do that, not without a lot of tricky, and potentially dangerous, networking. (I’m not sure that GoDaddy would even allow that kind of connection, but I’ve never looked into that.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Database Connection Fails’ is closed to new replies.