Changing user password does not update mysql password

dstana

Well-Known Member
Jul 6, 2016
83
10
8
Phoenix, AZ
cPanel Access Level
Root Administrator
Updating the cPanel password for a user throws a long mysql error saying the password couldn't be updated.

However, the `alter user` command from the mysql cli works just fine.
 

dstana

Well-Known Member
Jul 6, 2016
83
10
8
Phoenix, AZ
cPanel Access Level
Root Administrator
I resolved this with the alter query, so it's not really an issue for me at this point. But the issue seems to be with the cpanel api.

Code:
Password for “######” has been changed.FTP password change has been queued.
Error from MySQL query: Cpanel::Exception::Database::Error/(XID tqp3e9) The system received an error from the “MySQL” database “mysql”: ER_PASSWORD_NO_MATCH (Can't find any matching row in the user table)
 at /usr/local/cpanel/Cpanel/DBI.pm line 200.
    Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::db=HASH(0x2a738c0), "DBD::mysql::db do failed: Can't find any matching row in the "..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188
    Cpanel::DBI::_error_handler("DBD::mysql::db do failed: Can't find any matching row in the "..., Cpanel::DBI::Mysql::db=HASH(0x2a738c0), undef) called at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 348
    Cpanel::Mysql::Basic::_sendmysql_untrapped(Cpanel::Mysql=HASH(0x2a3df00), "SET PASSWORD FOR '######'\@'#############.com' = PASSWO"...) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 242
    Cpanel::Mysql::Create::__ANON__() called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 97
    eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 88
    Try::Tiny::try(CODE(0x2c4cca8), Try::Tiny::Catch=REF(0x2c281c0)) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 246
    Cpanel::Mysql::Create::_dbowner_to_all_without_ownership_checks(Cpanel::Mysql=HASH(0x2a3df00), "method", "GRANT", "users", HASH(0x2a3db10), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 118
    Cpanel::Mysql::Create::_dbowner_to_all_with_ownership_checks(Cpanel::Mysql=HASH(0x2a3df00), "method", "GRANT", "users", HASH(0x2a3db10), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 64
    Cpanel::Mysql::Create::add_dbowner_to_all(Cpanel::Mysql=HASH(0x2a3df00), "######", "#########", 0, undef, 1) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 308
    Cpanel::Mysql::Create::create_dbowner(Cpanel::Mysql=HASH(0x2a3df00), "######", undef, 1) called at bin/admin/Cpanel/cpmysql.pl line 167

QUERY: SET PASSWORD FOR '######'@'######.com' = PASSWORD('xxxxxxxxxxxxxxxx'); GRANT USAGE ON *.* TO '######'@'###########.com'; SET PASSWORD FOR '######'@'xx.xx.xx.xx' = PASSWORD('######'); GRANT USAGE ON *.* TO '######'@'xx.xx.xx.xx'; SET PASSWORD FOR '######'@'xx.xx.xx.xx' = PASSWORD('######'); GRANT USAGE ON *.* TO '######'@'xx.xx.xx.xx'; SET PASSWORD FOR '######'@'localhost' = PASSWORD('######'); GRANT USAGE ON *.* TO '######'@'localhost'
The system could not perform “GRANT” statements for the user “######” due to an error: Cpanel::Exception::Database::Error/(XID tqp3e9) The system received an error from the “MySQL” database “mysql”: ER_PASSWORD_NO_MATCH (Can't find any matching row in the user table)
 at /usr/local/cpanel/Cpanel/DBI.pm line 200.
    Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::db=HASH(0x2a738c0), "DBD::mysql::db do failed: Can't find any matching row in the "..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188
    Cpanel::DBI::_error_handler("DBD::mysql::db do failed: Can't find any matching row in the "..., Cpanel::DBI::Mysql::db=HASH(0x2a738c0), undef) called at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 348
    Cpanel::Mysql::Basic::_sendmysql_untrapped(Cpanel::Mysql=HASH(0x2a3df00), "SET PASSWORD FOR '######'\@'######.com' = PASSWO"...) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 242
    Cpanel::Mysql::Create::__ANON__() called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 97
    eval {...} called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 88
    Try::Tiny::try(CODE(0x2c4cca8), Try::Tiny::Catch=REF(0x2c281c0)) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 246
    Cpanel::Mysql::Create::_dbowner_to_all_without_ownership_checks(Cpanel::Mysql=HASH(0x2a3df00), "method", "GRANT", "users", HASH(0x2a3db10), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 118
    Cpanel::Mysql::Create::_dbowner_to_all_with_ownership_checks(Cpanel::Mysql=HASH(0x2a3df00), "method", "GRANT", "users", HASH(0x2a3db10), "database", "") called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 64
    Cpanel::Mysql::Create::add_dbowner_to_all(Cpanel::Mysql=HASH(0x2a3df00), "######", "sTNOEGu^i7wH", 0, undef, 1) called at /usr/local/cpanel/Cpanel/Mysql/Create.pm line 308
    Cpanel::Mysql::Create::create_dbowner(Cpanel::Mysql=HASH(0x2a3df00), "######", undef, 1) called at bin/admin/Cpanel/cpmysql.pl line 167
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
196
37
103
USA
cPanel Access Level
Root Administrator
Hello @dstana

Can you please check to see if the skip-name-resolve option is enabled in MySQL?

grep skip-name-resolve /etc/my.cnf

If so, please remove this line from the MySQL configuration file (/etc/my.cnf) and then restart the MySQL service. Please let us know if you continue to observe issues.