Forge Home


MySQL installation and configuration module


9,588 latest version

3.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.9.2 (latest)
released Jun 23rd 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'devopera-domysqldb', '0.9.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add devopera-domysqldb
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install devopera-domysqldb --version 0.9.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



devopera/domysqldb — version 0.9.2 Jun 23rd 2014


MySQL is the cornerstone of the Linux-Apache-MySQL-PHP (LAMP) stack. It's the single most popular open-source database engine. This Devopera install configures both client and server, including dynamically-allocated server settings to maximise MySQL performance for each host type.



  • Tidied up module for release open source


  • Fixed Facter change from 1.7.5 to 2.0.1, where certain facts were removed


  • Refactored to clean out dangerous ibdata resize code.


  • Modified to work with latest puppetlabs-mysql module. ${::root_home} used for command.pp calls. Safer creation of root@% user in dev profile.


  • Parameterised $timeout_restart to allow for really big databases to startup


  • Added ::dev profile that opens up access to MySQL for dev machines
  • Added ::command macro for running MySQL commands


  • When the log files change size, the old ibdata/ib_logfiles now get moved to a safe (temporary) store in /tmp, rather than being deleted.


  • Got rid of dynamic settings. All settings are set normally using the $settings array. If settings are undefined, sensible dynamic values are calculated.


  • Modified runonce to write notifications to a parameterised ${notifier_dir}.
  • Added mysql-devel to the list of 5.5 packages installed.


Setup MySQL server

class { 'domysqldb' : }

Setup with a given root password

class { 'domysqldb':
  root_password => 'admLn**',

Override given settings for each mysql component, e.g. key_buffer_size for mysqld

class { 'domysqldb':
  root_password => 'admLn**',
  settings = {
    'mysqld' => {
      'key_buffer_size' => '32M',

Tell MySQL to use a fixed buffer size, not to derive it as a fraction of available RAM (default behaviour) class { 'domysqldb': root_password => 'admLn**', settings = { 'mysqld' => { 'innodb_buffer_pool_size' => 512M, } } }

Operating System support

Tested with CentOS 6, Ubuntu 12.04

Copyright and License

Copyright (C) 2012 Lightenna Ltd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.