WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error establishing a database connection (30 posts)

  1. Barry_Sequence
    Member
    Posted 5 years ago #

    I am quite sure you guys get tired of seeing posts about this topic but I can't seem to find the specific information I need. After not being able to successfully install WP, I contacted our web host and got from them both the database IP address and the Server name as well as verified the assigned user name, password and database name. I am able to get into the database with this information using SQL Server Management Studio Express so it all appears to be correct. However, when I run install.php with that same information, I get the apparently famous error - "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 (known good server name)."

    Any suggestions??

  2. krembo99
    Member
    Posted 5 years ago #

    Double and triple check your config file.. sometimes a small _space or a dot can make the whole difference...

    I am able to get into the database with this information using SQL Server Management Studio Express so it all..

    Are you sure you are using MySQL and not SQL ??

  3. Barry_Sequence
    Member
    Posted 5 years ago #

    i have double and triple checked the config file. It could be a problem with SQL vs My SQL. I will have to get more information on that. Are the wp-config.php and the install.php SQL or MySQL specific???

  4. krembo99
    Member
    Posted 5 years ago #

    Yes ...
    The whole WordPress is MySQL specific (as far as I know)

  5. Barry_Sequence
    Member
    Posted 5 years ago #

    Thanks a lot - I just talked to our webhost and our plan with them had not been updated to include a MySQL database. I think it is just a legacy issue because as soon as I called them they offered us a new plan with both SQL and MySQL databases at the same cost with a free porting of our site. Hopefully, this well resolve any issues that I am having.

    Great support forum!!!

  6. krembo99
    Member
    Posted 5 years ago #

    well.. If you will move to MySQL it will SURELY resolve your problem :-)

  7. Barry_Sequence
    Member
    Posted 5 years ago #

    Hey - got the MySQL Upgrade which turned out to be the problem. However, I am now at the next apparent hurdle -

    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 50726_Wordpress database.

    Are you sure it exists? - YES - Would put a screenshot in here if I could from MySQL Manager. In answer to the question below, the 50726 was the assigned prefix for the database when it was created.

    Does the user 1679575 have permission to use the 50726_Wordpress database? YES - Permissions are set to ALL

    On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem? The name is exactly as it appears above. I have confirmed that the database is up and running from the MySQL manager and PHPAdmin.

    This shouldn't be that hard ;)!!!!!!!!!

  8. CarpetGuy
    Member
    Posted 5 years ago #

    I just went through the same thing! This has never happened before, but here is what it is. You know when you filled out the form with your username, then it could connect, but afterward you couldn't? Somehow, the info from that form didn't make it to the config file. Look at your wp-config.php file and make sure that your username is correct there, mine wasn't, it left off the prefix that the host adds. Check to see what the actual username is, then fix it in the config file.

  9. Barry_Sequence
    Member
    Posted 5 years ago #

    this doesn't seem to be the issue - I have never gotten past this point in the installation of the databases. I have checked the wp-config.php file many, many times. I have checked for spaces, typos, etc. and can't find anything. I just downloaded the wp-config.php file to see if it was being altered and it doesn't seem to be. I know that the database exists and I know that the user has access to it, I can get to it from the MySQL manager provided by my webhost. So much for the five minute install.

  10. CarpetGuy
    Member
    Posted 5 years ago #

    I am pretty sure it is some little something, I have installed WP dozens of times, but was just installing the 2.7 beta3 to test some plugins and had the same problem, but mine was the prefix to the username. In that form you fill out, I had the prefix there, but it didn't get put into the config file. All I can say is to make sure in your database control panel or whatever your host has, if it shows a list of databases and users, make sure there is no prefix missing in the config file, other than that, I don't know. Does your host offer Fantastico Deluxe? That is the easiest way to install wordpress. Simple scripts works good too, but it is not as quick. Since I was installing the beta, it wasn't available with Fantastico. Anyway, good luck!

  11. krembo99
    Member
    Posted 5 years ago #

    Did you checked for CAPITALS ?

  12. Barry_Sequence
    Member
    Posted 5 years ago #

    I did check for capitals and even deleted the database that I had created and changed it to all lowercase just to satisfy my own curiosity. I still received the same message back from the install.php. to make sure I wasn't missing something, I even went back to a clean wp-config-sample.php file and re-entered the information. Still received the same result.

    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 50726_wordpress database.

    I know this database exists and that the user has ALL privileges. I am going to search some other forums as most threads on this topic seem to just end without anyone really describing a solution.

  13. Barry_Sequence
    Member
    Posted 5 years ago #

    just for grins, I even created a new user and granted all privileges. I still get the same error. This has to be something really goofy. Like I said, I can get to the database with PHPAdmin, I know it exists, I know I have access rights. This just doesn't make sense.

  14. moshu
    Member
    Posted 5 years ago #

    I guess it is time for a call to your host. I reviewed a few earlier posts with the same error message, and they all came down to
    a) DB not being there
    b) user not having all the privileges
    c) faulty setup of the DB by the host

    Since you are saying that a) and b) are eliminated as possible errors...

  15. Barry_Sequence
    Member
    Posted 5 years ago #

    I don't even know what to ask the host at this point?? I have deleted and re-created the database several times with the same result. As with most hosts, as soon as you mention a third-party software application, they quickly state that they don't offer any support. Are there specific questions that I should ask regarding the DB setup?

  16. moshu
    Member
    Posted 5 years ago #

    I know they always blame third-party applications... however, the fact that they just recently added MySQL to your account and "ported" your site somewhere else -- makes me think that the error must come from their end.

    Ask them if they can show you that it is possible to connect to the MySQL DB via a PHP script. Because with the data they provided, you can't.

  17. cjeasom
    Member
    Posted 5 years ago #

    I have just been onto Register365 with this issue and their technical support department have confirmed that all of my settings are correct, however it isnt working and they dont know why.

    The guy even tried to install it for me and got the same error...

    He has 3 guys from technical working on it now!!! ;)

    Have to say register365 support has been nothing short of excellent for me.

    Regards
    Chris

  18. Barry_Sequence
    Member
    Posted 5 years ago #

    thanks Chris and moshu - i have filed a support ticket with my host but will continue to monitor this thread for a resolution that may give some insight into the issue. If you find a solution, please post it back here.

    Thanks,

    Barry

  19. cjeasom
    Member
    Posted 5 years ago #

    will do, no problem

  20. Barry_Sequence
    Member
    Posted 5 years ago #

    Hey Chris -

    Did you ever get any resolution on this? I have been in contact with my host a couple of times but as of yet, can't identify any specific problems on their end.

    Barry

  21. kyeyolander
    Member
    Posted 5 years ago #

    database name and user name in mine are the same except password. I went thru the same prob yesterday but succeded.

  22. isrit
    Member
    Posted 5 years ago #

    If anyone finds a solution please post back here. I have been playing with this for the past two days. I have my own dedicated servers and full administrative privileges and still get the same message that it will connect to the db server, but it cannot find the particular database. I've installed wp several times in the past and this is the first I've ever had this problem.

  23. moshu
    Member
    Posted 5 years ago #

    I've installed wp several times in the past and this is the first I've ever had this problem.

    Just curious: those previous installations also happened on this dedicated server - or elsewhere?

  24. Barry_Sequence
    Member
    Posted 5 years ago #

    Glad to hear I am not alone in working on this problem. I have gone through several iterations of deleting and recreating the database, setting privileges, verifying all of the information in the wp-config file. I am about at wits end.

  25. krembo99
    Member
    Posted 5 years ago #

    Could you please post server specifications ?
    Server type, Php Version, MySQL Version, Memory limits etc..

  26. Barry_Sequence
    Member
    Posted 5 years ago #

    Sorry - Put this away over the weekend. Amazed at how many problem posts appear at this site.

    Regarding the server specs - I am attempting to install on our host servers at Web.com.

    Php - 2.10.3
    MySQL - V5.0.22
    Memory Limit of 1GB but I have only allocated 512MB to database

  27. MichaelH
    Member
    Posted 5 years ago #

    I hope that's wrong for PHP. Need at least PHP 4.3.

    Leave your email address here and I'll contact you to see if I can figure out your problem (no promises).

  28. Barry_Sequence
    Member
    Posted 5 years ago #

    [email addr moderated and email sent] - Thanks

  29. robangus
    Member
    Posted 4 years ago #

    Ive only found one solution for the Can’t select database error. Which is to download "MySQL Administrator"

    In "MySQL Administrator" goto catalogs then the db name and right click then Drop Schema, then right click in box and create a new one.

    Worked fine for me. But i when had to do the whole wp-admin/install stuff. So its a last resort IF its a new acc.

  30. koitaki
    Member
    Posted 4 years ago #

    @krembo99

    Same issue, your post about Capitals did the trick for me. Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.