|
Add users and privileges to each catalog.
The super user of the 'def'' catalog is granted the CATALOG privilege that allows one to
change catalog with 'use catalog catalog_name'
When running with catalogs, the 'def' users are the only one that can get the following privileges:
CATALOG_ACL |
SHUTDOWN_ACL |
CREATE_TABLESPACE_ACL |
REPL_SLAVE_ACL |
BINLOG_MONITOR_ACL |
BINLOG_REPLAY_ACL |
BINLOG_MONITOR_ACL |
CONNECTION_ADMIN_ACL |
REPL_SLAVE_ADMIN_ACL |
BINLOG_ADMIN_ACL |
BINLOG_REPLAY_ACL |
SLAVE_MONITOR_ACL |
BINLOG_MONITOR_ACL |
REPL_MASTER_ADMIN_ACL;
Things to do :
- Privileges globals should be stored in catalog
- acl_init() should be run for all catalogs (as part of catalog->late_init())
- grant_init() should be run for all catalogs
- acl_reload() should only be run for current catalog
- In case of SIGHUP it should be run for all initialized catalogs
see reload_acl_and_cache() and late_init_all_catalogs()
|