Ask Your Question
0

How to install mysql - Error: This class has been deprecated

asked 2013-10-07 11:21:52 -0500

spuder gravatar image

In previous versions ( < 2.0.0) of the puppetlabs-mysql module, you would install mysql server like so:

#Shorthand
include mysql

or

#Longhand
class { 'mysql::server':
  config_hash => { 'root_password' => 'badpassword' }
}

Since the update to puppetlabs-mysql 2.0.0, the above syntax will throw the following error

#Error: ERROR:  This class has been deprecated and the functionality moved
into mysql::server.  If you run mysql::server without correctly calling
mysql:: server with the new override_options hash syntax you will revert
your MySQL to the stock settings.  Do not proceed without removing this
class and using mysql::server correctly.

If you are brave you ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-10-07 11:24:12 -0500

spuder gravatar image

updated 2013-10-07 11:40:53 -0500

Here is how to install mysql using puppetlabs-mysql >2.0.0

class { '::mysql::server':
  root_password   => 'foo',
  override_options => { 
      'mysqld' => { 'max_connections' => '1024' } , 
    }
}

The 'override_options' are optional. They basically are anything that you would normally put in the my.conf file

http://dev.mysql.com/doc/refman/5.1/en/option-files.html

The syntax to create a schema remains the same

   mysql::db { 'schema_fun':
      user     => 'foo',
      password => 'bar',
      host     => 'localhost',
      grant    => ['SELECT', 'UPDATE'],
  }
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-10-07 11:21:52 -0500

Seen: 983 times

Last updated: Oct 07 '13