Ask Your Question

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

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

spuder gravatar image

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

include mysql


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 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

spuder gravatar image

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

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

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


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

Seen: 1,004 times

Last updated: Oct 07 '13