FAQ

On Thu, 2013-03-21 at 03:37 -0700, Jithin Xavier wrote:
Hello All,

I wanted to create two two MySQL database with same user credential using
Puppet-MySQL. How can I achieve this? Please find my script below.

class mysql::vsdatabase {
include mysql
mysql::db { 'vidispine':
user => 'user',
password => 'user123',
host => 'db.<hostname>.com',
}
}

How can I add another database here with same credential.(If I create
different Class with different database and same credential I am getting
below error.
The current git version of the mysql module has a fix for this error:
https://github.com/puppetlabs/puppetlabs-mysql/commit/1d6ca771d480e756cfdc5f84d73ef2d49f08ba38
but it has not yet been released. In the mean time, you can separately
use the underlying resources: (The mysql::db type is just a
convenience), just add additional 'database' and 'database_grant'
resources as needed:

database { 'vidispine':
ensure => 'present',
charset => 'utf-8',
provider => 'mysql',
require => Class['mysql::server'],
}

database_user { '[email protected]':
ensure => 'present',
password_hash => mysql_password('user123'),
provider => 'mysql',
require => Database['vidispine'],
}

database_grant { '[email protected]/vidispine':
privileges => 'all',
provider => 'mysql',
require => Database_user['[email protected]'],
}

--
Calvin Walton <[email protected]>

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 7 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 21, '13 at 10:37a
activeMar 25, '13 at 11:23a
posts7
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2023 Grokbase