Can't edit user password with MariaDB 10.4

Operating System & Version
CloudLinux 7.8
cPanel & WHM Version
v90.0.16

manoaratefy

Active Member
Nov 17, 2018
37
3
8
Madagascar
cPanel Access Level
Root Administrator
Good morning,

I think that there is a bug with cPanel. Using MariaDB 10.4 (from CloudLinux repositories), nobody can update user password throught cPanel interface. The error log says:
Code:
[2020-11-02 09:47:31 +0100] info [whostmgrd] Successfully verified signature for cpanel (key types: release).
Cpanel::Exception::Database::Error/(XID 8xvtmg) The system received an error from the “MySQL” database “mysql”: 2000000000 (Handle is not in asynchronous mode [err was 2000 now 2000000000]
Field 'user' does not exist (not one of User))
at /usr/local/cpanel/Cpanel/DBI.pm line 200.
        Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::db=HASH(0x2fa50d0), "DBD::mysql::db selectall_hashref failed: Handle is not in asy"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188
        Cpanel::DBI::_error_handler("DBD::mysql::db selectall_hashref failed: Handle is not in asy"..., Cpanel::DBI::Mysql::db=HASH(0x2fa50d0), undef) called at /usr/local/cpanel/Cpanel/Mysql.pm line 1441
        Cpanel::Mysql::fetch_temp_users(Cpanel::Mysql=HASH(0x2f64410)) called at bin/cpses_tool.pl line 228
        bin::cpses_tool::action_CLEANUPSESSIONS("bin::cpses_tool", HASH(0x2f36e30)) called at bin/cpses_tool.pl line 76
        bin::cpses_tool::process_request(HASH(0x2f36e30)) called at bin/cpses_tool.pl line 61
        bin::cpses_tool::script("bin::cpses_tool") called at bin/cpses_tool.pl line 34
Cpanel::Exception::Database::Error/(XID xe74dj) The system received an error from the “MySQL” database “mysql”: 1356 (View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them)
at /usr/local/cpanel/Cpanel/DBI.pm line 200.
        Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::db=HASH(0x3d790c0), "DBD::mysql::db do failed: View 'mysql.user' references invali"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188
        Cpanel::DBI::_error_handler("DBD::mysql::db do failed: View 'mysql.user' references invali"..., Cpanel::DBI::Mysql::db=HASH(0x3d790c0), undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Compat/Password.pm line 242
        Cpanel::MysqlUtils::Compat::Password::_handle_auth_plugin_if_needed_dbh(Cpanel::DBI::Mysql::db=HASH(0x3d790c0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/MysqlUtils/Compat/Password.pm line 92
        Cpanel::MysqlUtils::Compat::Password::set_user_password_dbh(__CPANEL_HIDDEN__, Cpanel::DBI::Mysql::db=HASH(0x3d790c0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/Mysql.pm line 800
        Cpanel::Mysql::__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(0x3ef2f78), Try::Tiny::Catch=REF(0x3e46330)) called at /usr/local/cpanel/Cpanel/Mysql.pm line 815
        Cpanel::Mysql::set_password(Cpanel::Mysql=HASH(0x3ab39f0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/Admin/Base/DB.pm line 70
        Cpanel::Admin::Base::DB::SET_PASSWORD(Cpanel::Admin::Modules::Cpanel::mysql=HASH(0x3625e88), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/Admin/Base.pm line 713
        eval {...} called at /usr/local/cpanel/Cpanel/Admin/Base.pm line 713
        Cpanel::Admin::Base::run("Cpanel::Admin::Modules::Cpanel::mysql", "username", undef, "uid", 1984, "function", "SET_PASSWORD", "args", ...) called at /usr/local/cpanel/Cpanel/AdminBin/Server/Backend.pm line 132
        eval {...} called at /usr/local/cpanel/Cpanel/AdminBin/Server/Backend.pm line 130
        Cpanel::AdminBin::Server::Backend::run_admin_module("perl_module", "Cpanel::Admin::Modules::Cpanel::mysql", "uid", 1984, "args", ARRAY(0x3427590), "function", "SET_PASSWORD", ...) called at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 222
        Cpanel::AdminBin::Server::_request_handler(Cpanel::AdminBin::Server=HASH(0x34095b8), HASH(0x34737f8), undef) called at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 123
        Cpanel::AdminBin::Server::__ANON__() called at /usr/local/cpanel/Cpanel/Try.pm line 193
        eval {...} called at /usr/local/cpanel/Cpanel/Try.pm line 193
        Cpanel::Try::try(CODE(0x342ad10), "Cpanel::Exception::ProcessNotRunning", CODE(0x34152b8)) called at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 126
        Cpanel::AdminBin::Server::handle_cpwrapd_request(Cpanel::AdminBin::Server=HASH(0x34095b8), HASH(0x342de30)) called at /usr/local/cpanel/Cpanel/Server.pm line 2310
        Cpanel::Server::handle_cpwrapd_connection(Cpanel::Server=HASH(0x34702d0)) called at cpsrvd.pl line 1778
        cpanel::cpsrvd::_handle_unix_socket_connection("handle_cpwrapd_connection") called at cpsrvd.pl line 1090
        cpanel::cpsrvd::script() called at cpsrvd.pl line 431
Could you help me solve this?
 

andrew.n

Well-Known Member
Jun 9, 2020
401
98
28
EU
cPanel Access Level
Root Administrator
Is your MySQL server running fine? Do you have free space on the server? I suggest you to Submit a Ticket directly at cPanel as it looks like a corruption.
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
2,313
307
213
cPanel Access Level
Root Administrator
This line is particularly concerning to me:

Code:
Cpanel::Exception::Database::Error/(XID xe74dj) The system received an error from the “MySQL” database “mysql”: 1356 (View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them)
That seems like there is an issue with the MySQL system table itself, which will keep most anything from working well.

If you have access to SSH it would be good to check the error log, which would be at /var/lib/mysql/$hostname.err by default, although it can be changed by editing the /etc/my.cnf file on the system.

As @andrew.n said, we're always happy to take a look through a ticket too :D
 

manoaratefy

Active Member
Nov 17, 2018
37
3
8
Madagascar
cPanel Access Level
Root Administrator
After checking, effectively, there is something wrong with the view "mysql.user". I deleted it and imported the view from another cPanel server with MariaDB 10.4 and the error is solved.

However, nobodies still can't change its password from cPanel interface. But after downgrading to MariaDB 10.3, the problem is solved.
 

andrew.n

Well-Known Member
Jun 9, 2020
401
98
28
EU
cPanel Access Level
Root Administrator
Very weird...maybe it's a bug for CloudLinux to investigate as cPanel only provides MariaDB 10.3 as far as I know...I'm glad you found a workaround though :)