Add utility scripts to make installation easier

The `create_grants` scripts allow users to be easily "copied" to
MaxScale. It queries the backend for grants for all users and converts
them into similar grants for the MaxScale host.

The `create_roles.sql` is a small set of queries which creates two utility
roles, `proxy_authenticator` and `proxy_monitor`. These roles can be
assigned to the actual service and monitor users with a single grant
command.
This commit is contained in:
Markus Makela
2016-09-14 09:48:13 +03:00
parent 35d4be14d2
commit 1001654987
3 changed files with 93 additions and 0 deletions

7
script/create_roles.sql Normal file
View File

@ -0,0 +1,7 @@
CREATE ROLE proxy_authenticator;
GRANT SELECT ON mysql.user TO proxy_authenticator;
GRANT SELECT ON mysql.db TO proxy_authenticator;
GRANT SELECT ON mysql.tables_priv TO proxy_authenticator;
GRANT SHOW DATABASES ON *.* TO proxy_authenticator;
CREATE ROLE proxy_monitor;
GRANT REPLICATION CLIENT ON *.* TO proxy_monitor;