Contribution: dump_grants

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Francesc Guasch

    #1

    Contribution: dump_grants



    DESCRIPTION

    This tool dumps the permissions granted to the users of the MySQL
    database. It also could print a report of dangerous grants.


    USAGE


    Dump Grants will retrieve the permissions granted as sql commands
    and will store it in a flat file. The name of the file will have
    the week day, so historic versions of the permissions can be kept.




    ARGS


    --help : This text
    --version : Prints the version of the tool
    --hostname : DataBase Server Hostname
    --backup-dir : Directory where the grants will be stored
    If it's - the output is the STANDARD OUTPUT
    --check-domain : Checks the trailing string of the hostname
    --nodump : Won't store the data. The grants will be only checked.


    STORING

    In the backup directory there will be stored the grants. It will keep
    one week of data like this:

    mon_grants.sql
    tue_grants.sql
    ...


    CHECK DOMAIN

    This is a feature not related to dumping the database, but to check
    the domain of the grants.

    The way to do it is like this:
    $ dump_grants --host=SERVERNAME --check-domain=.My.Doma in
    REVOKE USAGE ON big.* FROM 'annmarie'@'%';
    REVOKE USAGE ON *.* FROM 'root'@'horta';

    The standard error will report the revokes suggested.


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw

Working...