Cpanel::DBI::_error_handler("DBD::mysql::st execute failed: There is no such grant defined

speckados

Well-Known Member
In the work of reviewing the correct operation of cpanel backups, I find this very common error.

This is a server that has been dragging accounts for 15 years. And some of them have been migrated from server to server.

Now with 10.3.34-MariaDB, I see these errors.

Any ideas?


Bash:
warn [pkgacct] SHOW GRANTS FAILED: show grants for 'fmsite_fmsite'@'kvm459.tamainut.net'; Cpanel::Exception::Database::Error/(XID m6g3je) The system received an error from the “MySQL” database “mysql”: ER_NONEXISTING_GRANT (There is no such grant defined for user 'fmsite_fmsite' on host 'kvm459.tamainut.net')
at /usr/local/cpanel/Cpanel/DBI.pm line 200.
        Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::st=HASH(0x4dad938), "DBD::mysql::st execute failed: There is no such grant defined"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 188
        Cpanel::DBI::_error_handler("DBD::mysql::st execute failed: There is no such grant defined"..., Cpanel::DBI::Mysql::st=HASH(0x4dad938), undef) called at /usr/local/cpanel/Cpanel/DBI/Mysql/Utils.pm line 98
        Cpanel::DBI::Mysql::Utils::show_grants(Cpanel::DBI::Mysql::db=HASH(0x4c4eed8), "fmsite_fmsite", "kvm459.tamainut.net") called at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 122
        eval {...} called at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 122
        Cpanel::Mysql::Basic::fetch_grants(Cpanel::Mysql::Basic=HASH(0x4a27ca8)) called at /usr/local/cpanel/Cpanel/Mysql/Backup.pm line 187
        Cpanel::Mysql::Backup::fetch_backup_as_hr(Cpanel::Mysql::Basic=HASH(0x4a27ca8), HASH(0x22ccb40), ARRAY(0x4319888)) called at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 674
        Cpanel::Pkgacct::Components::Mysql::_fetch_mysql_backup(Cpanel::Pkgacct::Components::Mysql=HASH(0x4a0db90)) called at /usr/local/cpanel/Cpanel/Pkgacct/Components/Mysql.pm line 108
        Cpanel::Pkgacct::Components::Mysql::perform(Cpanel::Pkgacct::Components::Mysql=HASH(0x4a0db90)) called at /usr/local/cpanel/Cpanel/Pkgacct.pm line 175
        Cpanel::Pkgacct::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
        eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
        Try::Tiny::try(CODE(0x4a27c48), Try::Tiny::Catch=REF(0x4b714b0)) called at /usr/local/cpanel/Cpanel/Pkgacct.pm line 183
        Cpanel::Pkgacct::perform_component(Cpanel::Pkgacct=HASH(0x4423db0), "Mysql") called at /usr/local/cpanel/scripts/pkgacct line 936
        Script::Pkgacct::script("Script::Pkgacct", "--skiphomedir", "--nocompress", "--backup", "fmsite", "/cprsync") called at /usr/local/cpanel/scripts/pkgacct line 158
        Script::Pkgacct::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
        eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
        Try::Tiny::try(CODE(0x22c7bc8), Try::Tiny::Catch=REF(0x22e4bb8)) called at /usr/local/cpanel/scripts/pkgacct line 168
 
Last edited by a moderator:
Feb 14, 2022
5
2
3
North Macedonia
cPanel Access Level
Website Owner
If the error occurs only for this particular database user, then most probably it is not a global issue, but rather a local one for this user/account, and I would suggest you get this database user re-created first and see how it goes.
If the issue still persists, you can either submit a ticket to cPanel's support to investigate this, or if your host is a managed one- you can also reach your host to check that further for you.