Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem authenticating with root on MySQL (CLI)

Discussion in 'Database Discussion' started by Kim_Vila, Apr 11, 2019.

  1. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi,

    I made the change of the MySQL root password through the "mysqladmin" and then my WHM becomes unable to login to the MySQL in any situation. The annoying part is that I keep receiving notifications about the impossibility of connection because the access is denied.
    Since the solutions proposed on some Google results is to restore the installation of MySQL or some other attempt of recovering (e.g. moving data folders of MySQL, then reinstalling MySQL), which seems to put the server at risk of being unrecoverable for good (I don't have a snapshot/full backup of the entire server, although there's the backup with filesystem backup).

    Anyway, now I learned that the WHM doesn't deal OK with the change of root password manually outside of the WHM interface.

    Does anyone know a way to revert the change ? Or there's no chance to revert this problem?

    Thanks in advance.
     
  2. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,352
    Likes Received:
    146
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    Update the /root/.my.cnf file with your new password. That should fix everything.

    Best to use the whm interface to change the mysql password.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    GOT, I tried to do this, but the problem persists. And the password has changed by some script within WHM (maybe at /scripts ).
    Now I know the best way to change the root password.
    And.. the password changing is not working anymore, it needs to force the change, and actually update, but the connection with root at MySQL doens't work.

    But, thanks for your time GOT :)
     
  4. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    The problem is getting bigger proportions, once the updates come and the routines over time are executed.
    Now there's a pile of problems. Of course, all related to the connection of the "root" at MySQL.
    With that in mind, I should consider rebuild my VPS ?
    This is a standalone account, not a shared hosting, which can be less painful proccess. Yet, I really didn't want to resintall all the system, and remake all the work I've had to build it and make running seamslessly (nothing is flawless, but you got it hehe).

    Anyway, I'm not desperated (yet!) but I'm accepting suggestions on facilitated ways to recover or bring back the "root" connection on MySQL.

    Thanks in advance.
     
  5. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,728
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Kim_Vila


    Can you try resetting the password at WHM>>SQL Services>>MySQL Root password and let us know if that resolves the issue?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi @cPanelLauren I already did this proccess (a few times, actually) and the output is this :

    Updated the password for the active MySQL profile.
    MySQL password change failed!!
    A forced reset will now be attempted.
    Attempting MySQL Root Password Reset

    The MySQL root password was reset.
    Applications using MySQL will now be updated.
    Updating “DBcache” configuration … Failed …
    The subprocess reported error number 255 when it ended.
    Done Updating “Eximstats” configuration … updateeximstats: database schema is up to date. Success …Done
    Updating “Roundcube” configuration … Roundcube is configured to use SQLite. This update is for Roundcube using MySQL. Running /usr/local/cpanel/bin/update-roundcube-sqlite-db. Roundcube update from 1.3.7-1.cp1176 to 1.3.7-1.cp1176 in progress. Roundcube updated to 1.3.7-1.cp1176 Success …Done
    Updating “phpMyAdmin” configuration … Success …Done
    You have successfully changed “root”’s MySQL password.

    Although the password is reseted to my previous one (which I set through WHM interface), I still face denial on the connections to MySQL, from direct CLI connection to the backup routines, and that's my main concern. Now I don't know what to do.
    If you have anything else to suggest, I'll be glad to hear it.

    Thanks in advance.
     
  7. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,728
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Kim_Vila

    Are you able to reset the password manually through mysql to whatever is listed in /root/.my.cnf? Then run the update once more through the UI?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi @cPanelLauren , the method I know to change the password is through the "mysqladmin" (syntax used : mysqladmin --user=root password "new_password_here" ), and the output to it was :

    # mysqladmin --user=root password
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'

    I actually didn't provide any password on the process above, it's just the automatic output.

    Thanks for your cooperation.
     
  9. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,728
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    To avoid further delays with this can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Kim_Vila

    Kim_Vila Member

    Joined:
    Apr 25, 2018
    Messages:
    8
    Likes Received:
    2
    Trophy Points:
    78
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi @cPanelLauren thanks for your availability to help me, but the how-to to opening tickets with cPanel showed me that I'll need to ask for support with my supplier.
    Anyway, I opened a ticket with its support team, and as soon as I get a response, I'll update the thread with the solution.

    Thanks again.
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice