Skip to content

Commit 0137e7e

Browse files
committed
Clarify how to grant specific privileges with database_grant
When I tried to use database_grant, I assumed the privilege names would match the SQL GRANT command, for example, SELECT or CREATE TEMPORARY TABLES.  But in fact the privilege names are taken from columns of the mysql.db table.  As a result, a row was created in mysqld.db, but none of the privileges I intended to grant were actually granted. Someone else filed a ticket with the same issue: http://projects.puppetlabs.com/issues/15808 Document that how to specify individual privileges in README.md.
1 parent 3084f8c commit 0137e7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ The custom resources can be used in any other manifests:
115115

116116
database_grant { 'user@localhost/database':
117117
privileges => ['all'] ,
118+
# Or specify individual privileges with columns from the mysql.db table:
119+
# privileges => ['Select_priv', 'Insert_priv', 'Update_priv', 'Delete_priv']
118120
}
119121

120122
A resource default can be specified to handle dependency:

0 commit comments

Comments
 (0)