Skip to main content

The system failed to connect to the MySQL database issue

Comments

2 comments

  • cPanelLauren
    Hi @steven_h This is fantastic, thanks for sharing it.
    We'll do some further digging on our end to see if this is a result of our install script, or something we should escalate.

    While this could be a part of an internal case we have open right now I would really like to see the outcome of your investigation. The internal case I believe it may relate to is CPANEL-22372. It's fixed in a future version of the product already. Thanks!
    0
  • steven_h
    Hey Lauren, you're indeed correct: We also confirmed that this is caused by CPANEL-22372. We managed to confirm this by tailing the SQL log (the log file that includes the hostname) through command-line while resetting the root SQL password. WHM would report a failure to change the password, then force a reset, and that new password would then be visible in the SQL log . The problem is that it does not update ~/.my.cnf so mysql will not work, but mysql -u root -p with the password from the SQL log will work. Oddly enough, yesterday I used a new installation with v68 on CentOS 7 which I then updated to the latest 74 build, to doublecheck my findings before posting here. The SQL root password reset would succeed now, even though it generated failures in 100% of our tests last friday (that server had CentOS 7 with a new installation of cPanel/WHM of 74). The command mysql would work now, but mysql -u root -p would not accept the new password. It turned out that in this case yesterday, only the [client] section is updated in ~/.my.cnf Updating the other fields manually 'fixes' the issue. I hope this will be able to help. If more in depth information such as screenshots could help, please let me know.
    0

Please sign in to leave a comment.