Introduction
How can I restore the MySQL user grants?
Procedure
The /usr/local/cpanel/bin/restoregrants script restores database users grants from the data in the /var/cpanel/databases/grants_* files. You can restore the grants using the following command:
/usr/local/cpanel/bin/restoregrants [--cpuser=cpuser] [--db=mysql|pg] [--dbuser=dbuser|--all]
Related documentation: