mysql module v 1.0 mysql_grant - database_grant

17 views
Skip to first unread message

Arnau Bria

unread,
Dec 9, 2013, 7:34:10 AM12/9/13
to puppet...@googlegroups.com
Hi,

I'm using mysql module version 0.6.1 and I wanted to upgrade. After
reading a little I saw that migrating from v 1 to 2 must be studied, so
I decided to upgrde to version 1.

BUT, I've seen a couple of warnings on my first run and I'm updating my
code, but I've found that my old sysntax for database_grant is not
compatible with mysql_grant.

So, if I had something like:

mysql_database{ [ 'biosql' , 'biosql-test' ] :
ensure => present,
require => Class['mysql::server'],

}

database_user { 'biocore@%.XXXXX' :
password_hash => mysql_password('XXXXX') ;
}
database_grant { [ 'biocore@%.XXXXXX/biosql' , 'biocore@%.XXXX/biosql-test' ] :
privileges => ['all'] ;
}


now I must write soemthing like:

mysql_grant { 'biocore' :
user => 'biocore@%.XXXXX',
table => 'biosql.*',
privileges => ['all'];
}

So, for each user/DB pair, now I must specify much more info. ( I have
hundrets of DDBBs)...

I've been reading the type code but I do not understand if I can still
use some simpler syntax as before...

Anyone using the module knows how to write it?

Cheers,
Arnau
Reply all
Reply to author
Forward
0 new messages