Hi all, I''m using the MySQL module https://forge.puppetlabs.com/puppetlabs/mysql and I can''t find the way to give certain permission to a secondary user over an already created DB (which has it own user): mysql::db { ''galaxy'': user => ''galaxy'', password => ''XXXXXX'', host => ''localhost'', grant => [''all''], } Now I would like to give select privileges on galaxy DB to user arnau, but I can''t find the way for doing so. Could someone give a hand? TIA, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
You can use the database_grant resource type. Here is an example: database_grant { "${user}@${::hostname}/${db}": privileges => [''select''], # anything you want require => Database_user["${user}@${::hostname}"], } set the $user and $db variables to what you want ;) More information can be found on the github README file for module. -- Nikola On Tue, Mar 05, 2013 at 09:21:28AM +0100, Arnau Bria wrote:> Hi all, > > I''m using the MySQL module > https://forge.puppetlabs.com/puppetlabs/mysql and I can''t find the way > to give certain permission to a secondary user over an already created > DB (which has it own user): > > > mysql::db { ''galaxy'': > user => ''galaxy'', > password => ''XXXXXX'', > host => ''localhost'', > grant => [''all''], > } > > Now I would like to give select privileges on galaxy DB to user arnau, > but I can''t find the way for doing so. > > Could someone give a hand? > > TIA, > Arnau > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Tue, 5 Mar 2013 10:48:16 +0200 Nikola Petrov wrote: Hi Nikola,> You can use the database_grant resource type. Here is an example: > > database_grant { "${user}@${::hostname}/${db}": > privileges => [''select''], # anything you want > require => Database_user["${user}@${::hostname}"], > } > > set the $user and $db variables to what you want ;) > > More information can be found on the github README file for module.thanks alot, I already had one database_grant but I''ve realized that I had a typo in the dtaabses (well, I was refering to antoher... galaxytest, for that reason it was not working. thanks a lot, Cheers, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Tue, 5 Mar 2013 10:48:16 +0200 Nikola Petrov wrote:> You can use the database_grant resource type. Here is an example:But.... how may I set its password? (it''s working cause my user was correctly created and I set its passwd before). *Sorry, I did reply too early.. Cheers, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.