GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lyudaio/grantsdump: mysql-grants-dump is a command-line tool to dump a list of all MySQL users and their grants

This repository was archived by the owner on Jul 22, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/ISSUE_TEMPLATE
.github/ISSUE_TEMPLATE
 
 
src/mysqlgrantsdump
src/mysqlgrantsdump
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

mysqlgrantsdump

NOTE

This is still actively in development and may not work properly until v1.0.0 release.

Description

mysqlgrantsdump is a command-line tool that allows you to dump a list of all MySQL users and their grants. It connects to a MySQL database and retrieves the users and their associated permissions, and outputs them in a table format using the prettytable module.

Getting Started

  1. Install the required dependencies by running pip install -r requirements.txt
  2. Run the tool using the following command: python mysql_grants_dump.py [OPTIONS]
  3. The available options are as follows:
    • -H, --host: The MySQL database host name or IP address. Default is localhost.
    • -u, --user: The MySQL database user name. Default is root.
    • -d, --database: The MySQL database name.
    • -P, --port: The MySQL database port number. Default is 3306.

Install using pip

pip install mysqlgrantsdump

Example Usage

From pip

mysqlgrantsdump -u root -p # Connects default to localhost for host.

From source

pip install -r requirements.txt
cd path/to/src
mysqlgrantsdump.py -u root -p

Example Output

+------------------+-----------+--------+--------+--------+--------+--------+------+-------+-------+
|       User       |    Host   | Select | Insert | Update | Delete | Create | Drop | Grant | Super |
+------------------+-----------+--------+--------+--------+--------+--------+------+-------+-------+
|   andrewhoward   |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|    carsonlisa    |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|      dsmith      |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|  elizabethbrown  |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|     grant03      |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|      ilopez      |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|   jeanneconrad   |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|     johngray     |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|  joshuawhitaker  |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|    kimolivia     |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|    krystal52     |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|     larry00      |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|   monicaadams    |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
| rodrigueznicole  |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|    uhernandez    |     %     |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
| mysql.infoschema | localhost |   Y    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|  mysql.session   | localhost |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   Y   |
|    mysql.sys     | localhost |   N    |   N    |   N    |   N    |   N    |  N   |   N   |   N   |
|       root       | localhost |   Y    |   Y    |   Y    |   Y    |   Y    |  Y   |   Y   |   Y   |
+------------------+-----------+--------+--------+--------+--------+--------+------+-------+-------+

License

mysqlgrantsdump is released under the MIT License. See LICENSE for more information.

About

mysql-grants-dump is a command-line tool to dump a list of all MySQL users and their grants

lyuda.io

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.