Thanks Calvin, It is working for me now. There is another issue which I
noticed in Mysql is, I have set the root password in config.pp as below.

class mysql::config(
 * $root_password     = 'Pa$$word!',*
  $old_root_password = '',
  $bind_address      = $mysql::params::bind_address,
  $port              = $mysql::params::port,
  $etc_root_password = $mysql::params::etc_root_pass

and server.pp as

class mysql::server (
  $package_name     = $mysql::params::server_package_name,
  $package_ensure   = 'present',
  $service_name     = $mysql::params::service_name,
  $service_provider = $mysql::params::service_provider,
*  $config_hash      = { 'root_password' => 'Pa$$word!'}*,
  $enabled          = true,
  $manage_service   = true
) inherits mysql::params {

issues which I am facing here is ,when I type mysql  command and enter
without asking credetial its is going to mysql console. If trued with mysql
-u root -p Pa$$word!, and its working as well..How can I restrict that
mysql command enter to without credential to console?

Thanks,
Jithin



On Thu, Mar 21, 2013 at 6:32 PM, Calvin Walton <[email protected]>wrote:

> 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]>
>



-- 
-Regards
Jithin Xavier
+91-9739505163
Skype- jithinxavi
in.linkedin.com/in/jithinxavier/

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to