Cpanel::MysqlFE::userdbprivs

This article documents the usage of the Cpanel::MysqlFE::userdbprivs function in relation to the cPanel interface. This tag can be used inside cPanel pages.


SYNOPSIS

Cpanel::MysqlFE::userdbprivs


DESCRIPTION

This function outputs the MySQL database access privileges for a specific MySQL user on a specific MySQL database.


VARIABLES

INPUT

user (string)
Full username of the MySQL user. Format: accountuser_mysqluser

db (string)
Name of the database the privileges are being examined on. Format: accountuser_dbname

OUTPUT

These returned checked or not checked.

+ALLPRIVILEGES (boolean)
+SELECT (boolean)
+CREATE (boolean)
+INSERT (boolean)
+ALTER (boolean)
+UPDATE (boolean)
+DROP (boolean)
+DELETE (boolean)
+LOCKTABLES (boolean)
+INDEX (boolean)
+REFERENCES (boolean)
+CREATETEMPORARYTABLES (boolean)


EXAMPLES

<?cp MysqlFE::userdbprivs( % % % % % % % % % % % % ,ALLPRIVILEGES,SELECT,CREATE,INSERT,ALTER,UPDATE,DROP,DELETE,LOCKTABLES,INDEX,REFERENCES,CREATETEMPORARYTABLES) user=$FORM{'user'},db=$FORM{'db'} ?>

This example will output the status of a specific MySQL user's privileges for a specific MySQL database.


COPYRIGHT

Copyright 2007 cPanel Inc.