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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Database Password Suddenly Not Working for Some Users

Discussion in 'Database Discussions' started by Varial, Jan 20, 2017.

Tags:
  1. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    In cPanel 60.0.32 what exactly does "CPANEL-10047: Update MySQL passwords to native format as needed." do?

    After upgrading to the latest version of cPanel we have received a couple reports of customers being unable to connect to their databases, which have always worked before. This is not occurring on all accounts, just a couple users right now.

    Changing their MySQL password and updating their web applications has fixed this.

    This particular server is using still using MySQL 5.5 with old passwords enabled due to a number of older clients hosted on it.
     
    Mahendra Varman likes this.
  2. Hispalab

    Hispalab Well-Known Member

    Joined:
    Apr 17, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Madrid -Spain
    No news about this problem?
     
    #2 Hispalab, Jan 24, 2017
    Last edited: Jan 24, 2017
  3. Varial

    Varial Member

    Joined:
    Oct 17, 2008
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    53
    Location:
    Saskatoon, Saskatchewan, Canada
    I've put in a support ticket about this and cPanel has confirmed it is a bug introduced 60.0.32 when MySQL old-passwords are used.

    The problem is a bit more serious than I thought because after changing the database password to fix the sites, restarting MySQL will break all of them again.

    This is because MySQL is setting the plugin for the user to mysql_native_password, even though the password is only 16 characters and not 41.

    One way to temporarily fix this is to run the following command to display all MySQL users with the mysql_native_password plugin set:

    mysql -e 'select user, length(Password), plugin from mysql.user WHERE plugin="mysql_native_password";'

    Next run "mysql" then:

    use mysql;
    update user set Plugin = '' where Plugin = 'mysql_native_password';

    This will set all users with mysql_native_password set to have no plugin specified, like it was previously.

    This is only a temporary fix though because if a MySQL user changes their password, the mysql_native_password plugin will be set again.

    cPanel has suggested disabling old-passwords from /etc/my.cnf as a better fix and said users with 16 character passwords should still be able to authenticate. I haven't tried this yet as I want to test this more thoroughly but if there are no other associated problems in doing so this would also be beneficial in the long task of migrating all users to 41 character passwords.

    cPanel has said they have fixed this bug in case CPANEL-10826, however this fix hasn't been released yet.
     
    Hispalab likes this.
  4. Hispalab

    Hispalab Well-Known Member

    Joined:
    Apr 17, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Madrid -Spain
    Thank you very much for your answer.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The information provided by @Varial is correct. Internal case CPANEL-10826 was opened to allow MySQL to determine whether to use old/native passwords rather than explicitly setting MySQL user passwords to mysql_native_password. The resolution is already included in cPanel version 62:

    Fixed case CPANEL-10826: Allow MySQL to determine whether to use old/native passwords.

    I'll update this thread again once the resolution is published to a cPanel version 60 build. In the meantime, the reccomended workaround is to turn disable old_passwords in /etc/my.cnf and then reset the password on affected users so that it's native.

    Thank you.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The resolution is now published as part of cPanel version 60.0.36:

    Fixed case CPANEL-10826: Allow MySQL to determine whether to use old/native passwords.

    Thanks!
     
    Hispalab likes this.
Loading...

Share This Page