Αποτελέσματα Αναζήτησης
23 Ιαν 2013 · I'm looking for some query to list all users that have grants over a package. For example, user Schema_A has been granted to execute package: B.MyPackage. I'm querying views or tables like:
21 Μαρ 2012 · select * from user_sys_privs; select * from user_tab_privs; select * from user_role_privs; DBAs and other power users can find the privileges granted to other users with the DBA_ versions of these same views.
1 Οκτ 2021 · MySQL does not have a direct command to show all users' privileges. For a quick overview, you can query the information_schema.user_privileges table: SELECT * FROM information_schema.user_privileges; However, this table only shows global user privileges without database-specific grants.
To display the privileges granted to the current user (the account you are using to connect to the server), you can use any of the following statements: SHOW GRANTS; SHOW GRANTS FOR CURRENT_USER; SHOW GRANTS FOR CURRENT_USER();
show grants works fine but if you need to know if user has special access from a specific IP/domain, a better command is: select * from information_schema.user_privileges where grantee like '%username%'; Sometimes, you can mess around creating users like username@localhost and the command above can help on discovering these pitfalls.
The MySQL SHOW GRANTS statement returns all privileges and roles granted to an account user or role. Here’s the basic syntax of the SHOW GRANTS statement: SHOW GRANTS [ FOR { user | role } [ USING role [, role ] ...]]
SHOW PRIVILEGES shows the list of system privileges that the MySQL server supports. The privileges displayed include all static privileges, and all currently registered dynamic privileges. mysql> SHOW PRIVILEGES\G. *************************** 1. row *************************** Privilege: Alter. Context: Tables. Comment: To alter the table.