If a database user loses access to databases, you can restore the user's grants to the database with the
To use the
restoregrants script to restore the user's database access, run one of the following commands from the command line:
/usr/local/cpanel/bin/restoregrants --cpuser=$cpuser --db=$type --dbuser=$dbuser /usr/local/cpanel/bin/restoregrants --cpuser=$cpuser --db=$type --all
The following table lists the variables that the above examples use:
|The cPanel username who lost access to their databases.|
The type of database:
The database user whose privileges you wish to restore.
In certain circumstances, the
restoregrants script may fail to restore access to the database.
If the script fails, either the cPanel user or the WHM user who owns the account (the reseller or system administrator) can reset the cPanel account's password to restore grants.
The cPanel user can restore grants with the following steps:
The server administrator or reseller can restore grants with the following steps: