The dbmaptool Script v82

Valid for versions 82 through the latest version

Version:

82


Overview

You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases and database users to a cPanel user via the command line.

How to call the script

To run this script on the command line, use the following format:

/usr/local/cpanel/bin/dbmaptool user option

Options

Use the following options with this script:

  • --type — The database type to which you wish to assign owners.
  • --dbs — A comma-separated list of the database names that the cPanel user will own.
  • --dbusers — A comma-separated list of the database users that the cPanel user will own.

Example

For example, if you wish to grant ownership of the db1 MySQL® database with the virt1 database user to the user1 cPanel user, run the following command:

/usr/local/cpanel/bin/dbmaptool user1 --type 'mysql' --dbs 'db1' --dbusers 'virt1'

If the script succeeds, it will not return output.

Additional Documentation