These are queries to help assist with retrieving users inside of a MySQL instance and the permissions that those users are assigned. These queries are designed to only read data and will not modify or create data inside of the database.
This query is designed to select the device hostname and database version.
SELECT @@hostname, @@version_comment, VERSION();This query is designed to select information about global privileges granted to users.
SELECT * FROM information_schema.user_privileges;This query is designed to select information about the schema (database) privileges.
SELECT * FROM information_schema.schema_privileges;This query is designed to select information about table-specific privileges for roles and users that are available or granted by the currently enabled roles.
SELECT * FROM information_schema.table_privileges;This query is designed to select information about column-specific privileges for roles and users that are available or granted by the currently enabled roles.
SELECT * FROM information_schema.column_privileges;This query is designed to select all role assignments that have been granted by currently enabled roles.
SELECT * FROM mysql.role_edges;This query is designed to select information about the table privileges for roles that are available or granted by the currently enabled roles.
SELECT * FROM information_schema.role_table_grants;This query is designed to select all system variables from the validate_password component.
SHOW VARIABLES LIKE '%password%';