Syntax\n------\n\nSHOW GRANTS [FOR user|role]\n\nDescription\n-----------\n\nThe SHOW GRANTS statement lists privileges granted to a particular user or role.\n\nUsers\n\nThe statement lists the GRANT statement or statements that must be issued to duplicate the privileges that are granted to a MariaDB user account. The account is named using the same format as for theGRANT statement; for example, 'jeffrey'@'localhost'. If you specify only the user name part of the account name, a host name part of '%' is used. For additional information about specifying account names, see GRANT.\n\n``sql\nSHOW GRANTS FOR 'root'@'localhost';\n+---------------------------------------------------------------------+\n| Grants for root@localhost                                           |\n+---------------------------------------------------------------------+\n| GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' WITH GRANT OPTION |\n+---------------------------------------------------------------------+\n`\n\nTo list the privileges granted to the account that you are using to connect to the server, you can use any of the following statements:\n\n`sql\nSHOW GRANTS;\nSHOW GRANTS FOR CURRENT_USER;\nSHOW GRANTS FOR CURRENT_USER();\n`\n\nIf SHOW GRANTS FOR CURRENT_USER (or any of the equivalent syntaxes) is used in DEFINER context (such as within a stored procedure that is defined withSQL SECURITY DEFINER), the grants displayed are those of the definer and not the invoker.\n\nRoles\n\nSHOW GRANTS can also be used to view the privileges granted to a role.\n\nExamples\n--------\n\nSHOW GRANTS FOR journalist;\n+------------------------------------------+\n| Grants for journalist                    |\n+------------------------------------------+\n| GRANT USAGE ON . TO 'journalist'       |\n| GRANT DELETE ON test`.* TO 'journalist' |\n+------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-grants