This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.
The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
Some MySQL options need to be passed several times. For example :
http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-do-db
This is currently impossible with the override_options. This patch allows to
pass array as value. Example :
override_options => {
'client' => {
'password' => 'xxx',
},
'mysqld' => {
'bind_address' => '0.0.0.0',
'replicate-do-db' => ['base1', 'base2', 'base3'],
},
}
Which will be evaluated into :
[client]
password = xxx
[mysqld]
bind_address = 0.0.0.0
replicate-do-db = base1
replicate-do-db = base2
replicate-do-db = base3
The documentation in README.md states that it is possible to set the root password, but it does not give an example.
This pull request adds an example of how to set the root password
The section for mysql::client didn't specify that package_name and package_enable were available parameters.
Also took the liberty of making the override_options sections identical between ###Overrides and ###Parameters->mysql::server->override_options, as well as marking various other items as `code`, for a prettier display.
This turned out to be a fairly bad idea. It begun as a way to try
and mirror what happens in the postgresql module for consistency
but instead made things complex.
I've changed it to have the override_options in mysql::server which
leads much more naturally out of the design and shape of MySQL.
In my vim-setup, the underscore in `create_resources` leads to
rendering everything in italics after that. Wrapping it in backticks
solves this in the editor and also looks better when rendered as HTML.
Pluginsync is required for this module to function properly. This
commit mentions that requirement and points at documentation on
how to enable pluginsync.
When I tried to use database_grant, I assumed the privilege
names would match the SQL GRANT command, for example, SELECT
or CREATE TEMPORARY TABLES. But in fact the privilege names
are taken from columns of the mysql.db table. As a result,
a row was created in mysqld.db, but none of the privileges
I intended to grant were actually granted.
Someone else filed a ticket with the same issue:
http://projects.puppetlabs.com/issues/15808
Document that how to specify individual privileges in
README.md.
This is a major change to the module and would be released as a new
version.
* Add self.instances to database and database_user for puppet resource.
* Update database provider to use flush method.
* Update module to conform to puppet-lint recommendations.
* Cleanup some unecessary logic in mysql::db define type.
* Move mysql_restart to config class.
* Use class to class dependency instead of resource dependency.
* Change appropriate rspec-puppet tests.
* Add fixtures directory to simplify testing.
* Update raketask and spec_helper to reflect fixture changes.
* Update mysql_password function to support validation.
* Move client installation to a separate class.
* Update documentation and readme.