Skip to main content

website is down (error establishing database connection)

Comments

11 comments

  • cPRex Jurassic Moderator
    Hey there! I'm sorry to hear about the database connection issues. I wouldn't normally think that would be related to the type of hosting plan, but to a problem with either the database connection information (user, password, database name) in your connection string or a problem with the database server itself. If you can confirm the database connection details are correct on your site you'd want to speak with your hosting provider or datacenter to have them check your account as they would have access to the database logs on the machine to see more details on the issue.
    0
  • keat63
    When your hosts give you a new account, they would only normally do so once it was created and working, so I'd suggest that any database issues are not going to fix themselves. I'd go as far to say that anything more than 5 minutes and you have a problem on your hands, something is broken. Your hosts provider would be the best place to start. These guys have deep access inside your account. Any reputable host should have this fixed in an hour. (maybe a few hours for an email ticket)
    0
  • christinefung
    thank you
    0
  • jxmot
    @cPRex I'm having the same problem establishing a local connection (from served PHP files) to the MySQL database. This was working fine up until the update to cPanel 92.0 (build 8). External connections like using Workbench are OK. After a some investigation into the settings the PHP code was using and workbench I think I figured out what is wrong. The server that Workbench connects to through an SSH login is 127.0.0.1, the server that the PHP code was using was "somedomain.com". When I changed "somedomain.com" to 127.0.0.1 it began to work again. So either I had it wrong right from the beginning using the "somedomain.com" or/and something has changed in the cPanel 92.0 (build 8) update. What do you think?
    0
  • cPRex Jurassic Moderator
    Hey @jxmot, Are you using MySQL 5.6? That's the only version that received any type of update during the 92.0.8 change:
    0
  • jxmot
    Thanks @cPRex for getting back to me. I just checked and the version of MySQL being reported is 5.7.32. This "problem" has occurred very recently. It's good that I know how to fix it on my end, but I'm curious to know why... if just to have a better understanding of why it occurred and to prevent it in the future. Thanks again!
    0
  • cPRex Jurassic Moderator
    Are you using CloudLinux on that machine? If so, I'm wondering if CageFS needs to be updated, although I'll admit that's a wild guess as I haven't seen any other reports of this today.
    0
  • jxmot
    I don't think so. The machine is supposed to be a dedicated server.
    0
  • cPRex Jurassic Moderator
    The type of server wouldn't necessarily matter - you'd be able to see the OS listed in the top-right of the WHM interface.
    0
  • jxmot
    It's Centos 7.9
    0
  • cPRex Jurassic Moderator
    Thanks for letting me know about the OS. That would mean that CloudLinux isn't a factor, but I don't have any other details on what may have been the cause of that change as we didn't make any updates that would have been applied to your specific system based on your OS or database version.
    0

Please sign in to leave a comment.