Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter chimi

    (@chimi)

    it shows the following error

    (Error establishing a database connection)

    Thread Starter chimi

    (@chimi)

    this errors comes to me

    plz help

    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.

    Did you add your new user to your database? You can create them individually but they must be connected so that WordPress can recognize the configuration.

    You will need correct database name, username, password, mysql host name. If any of these details is wrong, you will get the database error. If your blog is hosted on any web hosting provider’s server, you can ask for this details.

    Hey everyone. I recently went through the exact same problem. My situation is slightly different so my solution may not apply (exactly as I say), but it’s another thing to check out. I’ve installed MAMP and am planning to do my development prior to paying for a webhost and turning my wordpress site loose on the world. So, I was installing wordpress locally after installing MAMP on my iMac.

    The Error (database error) – I started the famous 5 minute install and could never make it past the “Setup configuration file” page. You know, the page where you enter your database connection details. I would fill it out, click submit, and I’d get the error page saying I had something wrong with my DB name, username, or password. If I tried to manually create the config file I’d get the bold black lettered page “failed to establish a database connection.”

    Every resource I found said the same thing, you have either misspelled the dbname, db user id, or the password or your database server was down. I didn’t have any of those problems – but I was still getting the same database connection error.

    My real Problem – my database user preferences were not set up properly. I folllowed the “Create Database and a User” section to a “T.” There is a step that was not included in these detailed instructions. Somewhere in step two when you are creating your database user they failed to mention you may need to change the “Host” field to meet your requirements. They say nothing about changing this so I left it at it’s default value of “any host.” That was my problem.

    The solution – change the database user login information “Host” field to “localhost” (for my uses). You may need to change this to the server-name (aka hostname) that you are using, for me, the “Any host” didn’t work. I made this change and bam! every thing worked. You can do this by loggin into the phpMyAdmin tool, selecting priveledges, clicking edit on your database user that your created, then near the bottom under the login information section change the host field to the hostname of your database server (you’ll find the hostname of your database server located at the very top of the main phpmyadmin page, just above the “Database” tab). In my case it’s “localhost.” I changed the host field to “localhost” and this solved my problem.

    I was then able to continue with the install and get my wordpress site up and running in my test environment.

    Good luck.

    Thread Starter chimi

    (@chimi)

    Yes ericreynolds007 i create username , password , database name, and also add mysql host name through MYPHPADMIN because my hosting is windows base hosting thats why i install the XAMPP myphpadmin and create the following now i would like to know how to connect my database with wordpress..

    Regards
    Chimi

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘how to configure database wp-configure.php file ?’ is closed to new replies.