Difference between revisions of "User Management"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
<code>> GRANT write ON factbook TO test</code> | <code>> GRANT write ON factbook TO test</code> | ||
<p> | <p> | ||
− | Note | + | Note: Local permissions overwrite global permissions. |
As a consequence, the 'test' user will only be allowed to | As a consequence, the 'test' user will only be allowed to | ||
access (i.e., read and write) the 'factbook' database. | access (i.e., read and write) the 'factbook' database. | ||
If no local permissions are set, the global rights are | If no local permissions are set, the global rights are | ||
inherited. | inherited. | ||
− | + | </p> | |
− | |||
− | |||
===Showing global permissions=== | ===Showing global permissions=== | ||
Line 28: | Line 26: | ||
===Showing local permissions on database 'factbook'=== | ===Showing local permissions on database 'factbook'=== | ||
<code>> SHOW USERS ON factbook</code> | <code>> SHOW USERS ON factbook</code> | ||
+ | |||
+ | <p>Note: Admin permissions are needed to review the user permissions.</p> | ||
===Dropping of user 'test'=== | ===Dropping of user 'test'=== |
Revision as of 12:24, 6 December 2010
User Management
Creating user 'test' with password 'test'
> CREATE USER test test
As global permissions, you can set 'none', 'read', 'write', 'create' and 'admin':
Revoking all global permissions from user 'test'
> GRANT none TO test
Valid local permissions are 'none', 'read' and 'write':
Granting write permission on database 'factbook' to user 'test'
> GRANT write ON factbook TO test
Note: Local permissions overwrite global permissions. As a consequence, the 'test' user will only be allowed to access (i.e., read and write) the 'factbook' database. If no local permissions are set, the global rights are inherited.
Showing global permissions
> SHOW USERS
Showing local permissions on database 'factbook'
> SHOW USERS ON factbook
Note: Admin permissions are needed to review the user permissions.
Dropping of user 'test'
> DROP USER test