Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Keep getting an error - "An error occurred while attempting to connect to the database"

blizeHblizeH ✭✭
edited August 2012 in Vanilla 2.0 - 2.8

Hi,

I've had Vanilla installed for years (since the early days of Vanilla 1) and mostly it's been absolutely flawless, but for the past couple of days I keep receiving this error:

"An error occurred while attempting to connect to the database" SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql.database.com' (2)"

I have no idea what's causing this, the host has looked into it and can't see any problems, they've also created a test page for me (just a simple page with a link to the database, which saves an error log) and I've not been able to replicate the error.

Any suggestions on what to do please? I'll admit I haven't updated for a few months because there's no sticky thread any more to let us know when a new version is out - afaik I'm running the last stable released version

Many thanks

Best Answer

  • UnderDogUnderDog MVP
    edited August 2012 Answer ✓

    Don't worry about your version for a moment, this is pure a problem while connecting to the DataBase server.

    Your host has multiple websites running and they all point to mysql.database.com, right? (I know, it's a made up address, but I get the idea).

    is your host godaddy?
    Do they have a special port assigned where you need to connect through?
    Is there some way you can connect to my_mysql.database.com and let the others still connect to mysql.database.com, so they can filter out your connections?

    I just saw a couple of similar error messages, when I googled for 'SQLSTATE[HY000] [2005] Unknown MySQL server host' (stackoverflow is amazing in this case). They were talking about connecting to mysql through a different port
    Also, that (2) behind the error message is a tcp/ip error. I saw a couple of 10060 errors on stackoverflow and that one is definitely a tcp/ip error, so look for what tcp/ip error 2 is :-)

    There was an error rendering this rich post.

Answers

  • UnderDogUnderDog MVP
    edited August 2012 Answer ✓

    Don't worry about your version for a moment, this is pure a problem while connecting to the DataBase server.

    Your host has multiple websites running and they all point to mysql.database.com, right? (I know, it's a made up address, but I get the idea).

    is your host godaddy?
    Do they have a special port assigned where you need to connect through?
    Is there some way you can connect to my_mysql.database.com and let the others still connect to mysql.database.com, so they can filter out your connections?

    I just saw a couple of similar error messages, when I googled for 'SQLSTATE[HY000] [2005] Unknown MySQL server host' (stackoverflow is amazing in this case). They were talking about connecting to mysql through a different port
    Also, that (2) behind the error message is a tcp/ip error. I saw a couple of 10060 errors on stackoverflow and that one is definitely a tcp/ip error, so look for what tcp/ip error 2 is :-)

    There was an error rendering this rich post.

  • Many thanks Underdog, glad to know it's not a version issue :)

    And sound about right, I'm with IX Web Hosting rather than GoDaddy, what you recommended is a really good shout thank you, but I'm not sure if they'd be willing to set up a new database just for me. Can't hurt to try though!

    (I've already tried logging in as a different DB user btw, they told me that was the problem and changed it for me, to no avail)

  • As long as they're trying, it's all-right. Let them try, If they give good efforts, just don't worry about which efforts they give
    If they say 'Hey, cannot find the problem, Vanilla must be the culprit', then you've got something to worry about ;-)

    There was an error rendering this rich post.

  • Hah, very true! Thank you UnderDog, hopefully they fix it :)

Sign In or Register to comment.