DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) SHOW GRANTS

Info Catalog (mysql.info.gz) SHOW ERRORS (mysql.info.gz) SHOW (mysql.info.gz) SHOW INDEX
 
 13.5.4.10 `SHOW GRANTS' Syntax
 ..............................
 
      SHOW GRANTS FOR USER
 
 This statement lists the `GRANT' statements that must be issued to
 duplicate the privileges for a MySQL user account.
 
      mysql> SHOW GRANTS FOR 'root'@'localhost';
      +---------------------------------------------------------------------+
      | Grants for root@localhost                                           |
      +---------------------------------------------------------------------+
      | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
      +---------------------------------------------------------------------+
 
 As of MySQL 4.1.2, to list privileges for the current session, you can
 use any of the following statements:
 
      SHOW GRANTS;
      SHOW GRANTS FOR CURRENT_USER;
      SHOW GRANTS FOR CURRENT_USER();
 
 Before MySQL 4.1.2,  you can find out what user the session was
 authenticated as by selecting the value of the `CURRENT_USER()'
 function (new in MySQL 4.0.6).  Then use that value in the `SHOW
 GRANTS' statement.   `CURRENT_USER()' Information functions.
 
 `SHOW GRANTS' is available as of MySQL 3.23.4.
 
Info Catalog (mysql.info.gz) SHOW ERRORS (mysql.info.gz) SHOW (mysql.info.gz) SHOW INDEX
automatically generated byinfo2html