• I’ve edited wp-config with the correct username, password, hostname, etc, and still get this ‘Error establishing a database connection’. I’ve read many forums for solutions, but nothing has worked so far. Changed hostname to 127.0.0.1, doesn’t work. I did the oldpassword sql thing to no avail. Does WordPress append characters to the front or rear the the database name I supply, could it be looking for a database name with appended characters, maybe “wp_” or something. I am trying to install on my local host. Using Apache software to develop and test dynamic web pages, but can’t get the WordPress to install. Please tell me what I am doing wrong or where I can find the correct database name, userid, password, etc. that WordPress is expecting. I am quite sure I have spelled them correctly in wp-config.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The database name should be localhost and not the ip address. I could be wrong though just check it out.

    how did you create database and user?

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    Make sure the database which you’re putting in the install page actually exists – WordPress doesn’t attempt to create the database itself, only the tables within.

    Does WordPress append characters to the front or rear the the database name I supply, could it be looking for a database name with appended characters, maybe “wp_” or something.

    No, It uses it just as you supply it.

    I’d suggest attempting to connect with PHPMyAdmin or similar to make sure the details (and database listed) are correct.

    Make sure that your database has all the necessary permissions via your hosting control panel.In case the login details in your wp.config file are 100% identical with the database user and password details set by you while adding your db in your control panel, try to run grant all command to set all the db permissions.

    If this won’t help, try to import the database latest dump via PHPMyadmin.

    Thread Starter paulkiser

    (@paulkiser)

    I created the database in PHPMyadmin with the name ‘wordperss’, is this a bad name, does it confuse WordPress. It was suggested by the tutorial in Dreamweaver that I was going by, also in the WordPress install documentation. Username me, ‘paulkiser’ was added with all privileges on the ‘wordpress’ database. It has 0 tables in it. The install documentation didn’t say anything about adding tables, yet. When I bring up the page in PHPmyadmin ‘Users having access to ‘wordpress’ database it lists the user ‘paulkiser’ and ‘root’, under the ‘Host’ heading for ‘root’ it lists ‘Linux’ and ‘localhost’, for ‘paulkiser’ under ‘Host’ it lists ‘%’, is this a problem, why doesn’t it have ‘localhost’ for me also, could this be my problem, it so how do I get PHPMyAdmin to put ‘localhost’ as my host? I can see how this may confuse WordPress, but I don’t know any way to get ‘localhost’ in there. Any suggestions.

    Thread Starter paulkiser

    (@paulkiser)

    Have a typo in there. Created database name is ‘wordpress’ not ‘wordperss’.

    Hi all,
    I also have a similar situation, I am using local host to create my website, the whole site almost finish, but suddenly the website appear “Error establishing a database connection”, I try to access the admin Control Panel, below is the page info:

    Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the tsc database.

    Are you sure it exists?
    Does the user root have permission to use the tsc database?
    On some systems the name of your database is prefixed with your username, so it would be like username_tsc. Could that be the problem?

    Is it means my database is not exist any more? and need to re-build the whole website again??

    I don’t know what happen and how to recover it?

    any friend can help me?

    Thank you in advanced!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.