If your server is running an unsupported version of MariaDB (namely 10.4 and 10.5) and it looks like a recent update to cPanel & WHM (namely version 92) broke new MySQL database users, you might see errors in the cPanel error log like these:
When trying to assign a user to a database:
Cpanel::Exception/(XID 68gz6x) This system will not add the database user “cptest_user” to the database “cptest_db” because this user does not have a password.
There is no such grant defined for user 'username' on host 'localhost'
When trying to set a new password for a user:
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)
The system received an error from the “MySQL” database “mysql”: ER_PARSE_ERROR
(You have an error in your SQL syntax; check the manual that corresponds to your
MariaDB server version for the right syntax to use near '; /* passwduser */' at line 1)
The versions of MySQL and MariaDB were hardcoded into cPanel & WHM in a case which was created to support MySQL 5.5 in version 92. For wondering administrators, changes were made to /usr/local/cpanel/Cpanel/MysqlUtils/Grants.pm that cause these issues on unsupported MySQL versions.
At this time, this behaviour will not change until support is added to the product for the unsupported version.
As explained in a similar article, MySQL Governor allows upgrades to unsupported versions of MariaDB, If it's too late and you have already upgraded past 10.3, there is no downgrade path. Neither cPanel, CloudLinux nor even the MariaDB developers support a downgrade. You will need to make backups of all databases, completely remove MariaDB 10.4 or 10.5 and install MariaDB 10.3 and then restore your databases. You may even need to rely on previous backups that you took before the upgrade to 10.4 or 10.5.