Child pages
  • The dbstoregrants Script
Skip to end of metadata
Go to start of metadata

This documentation is for cPanel & WHM version 70 CURRENT builds.  The "RELEASE" version of our documentation can be found in the Version 68 Documentation space.

Overview 

Sometimes, you must make changes directly to a MySQL® user's grants in the YAML and JSON files in the /var/cpanel/databases/ directory through the command line. Use the /bin/dbstoregrants script to synchronize changes to those grants.

This will ensure that cPanel & WHM contains changes that you make on the command line.

Call the script

To run this script at the command line, run the following command as the root user:

/usr/local/cpanel/bin/dbstoregrants username

Note:

In this example, username represents the user for whom you wish to synchronize the MySQL grants changes.

To run this script for all cPanel users, run the following command as the root user:

for i in `ls -I \. -I \.\. -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dbstoregrants $i ; done

Additional documentation