2012-02-09 20:26:00 +01:00
|
|
|
$mysql_root_pw = 'password'
|
|
|
|
|
2011-05-27 03:11:24 +02:00
|
|
|
class { 'mysql::server':
|
Fixed test classes
Oracle 7 uses mariadb
Update PE and OS compatibility info in metadata
Now compatible with PE 3.4 and SLES 10.
Clean up metadata for new SLES support
Add timeout parameter to increase for long time running sql imports
Signed-off-by: refnode <refnode@gmail.com>
Add documentation for new mysql::db "import_timeout" parameter
Signed-off-by: refnode <refnode@gmail.com>
Add support for Gentoo
The old regex requires something after the 'host' part. Fix this.
Old regex is : /^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/ . The
last part (\s.*)$ means "a space followed by anything". The issue is
that when user has no GRANT privileges, the "SHOW GRANTS FOR #{user_string}" returns
"GRANT SELECT ON `database`.* TO 'user'@'%'" which does not match (\s.*)$ .
This small patch fixes this making last bloc optional (thanks to '?').
Add explicit dependencies for types
mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.
I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.
I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.
(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template
Improve checks for MySQL user's name.
As per http://dev.mysql.com/doc/refman/5.5/en/identifiers.html , MySQL
allows for more than '\w-'. This commit improves the check to ensure
that:
- if username only contains [0-9a-zA-Z$_], it might be quoted. It is
not a requirement though
- if username contains anything else, it MUST be quoted
I kept 2 checks, but the 2nd one can probably be removed (I can't find a
username which match the 2nd one but not the first.)
Fix escaped backslashes in grants
* Mysql uses the underscore character to represent a single character
wildcard.
* A grant on table `the_database`.* would match `theAdatabase`.*, so
underscores must be escaped to avoid this match.
* The output from mysql escapes special characters (\n, \t, \0, and \\),
but the input does not need to be escaped.
* In order for the provider to compare the tables, the output of
mysql -NBe <query> must have \\ substituted with \.
Fixed backup test
Oracle 7 uses mariadb
Update PE and OS compatibility info in metadata
Now compatible with PE 3.4 and SLES 10.
Add timeout parameter to increase for long time running sql imports
Signed-off-by: refnode <refnode@gmail.com>
Add documentation for new mysql::db "import_timeout" parameter
Signed-off-by: refnode <refnode@gmail.com>
Add support for Gentoo
The old regex requires something after the 'host' part. Fix this.
Old regex is : /^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/ . The
last part (\s.*)$ means "a space followed by anything". The issue is
that when user has no GRANT privileges, the "SHOW GRANTS FOR #{user_string}" returns
"GRANT SELECT ON `database`.* TO 'user'@'%'" which does not match (\s.*)$ .
This small patch fixes this making last bloc optional (thanks to '?').
Add explicit dependencies for types
mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.
I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.
I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.
(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template
Improve checks for MySQL user's name.
As per http://dev.mysql.com/doc/refman/5.5/en/identifiers.html , MySQL
allows for more than '\w-'. This commit improves the check to ensure
that:
- if username only contains [0-9a-zA-Z$_], it might be quoted. It is
not a requirement though
- if username contains anything else, it MUST be quoted
I kept 2 checks, but the 2nd one can probably be removed (I can't find a
username which match the 2nd one but not the first.)
Fix escaped backslashes in grants
* Mysql uses the underscore character to represent a single character
wildcard.
* A grant on table `the_database`.* would match `theAdatabase`.*, so
underscores must be escaped to avoid this match.
* The output from mysql escapes special characters (\n, \t, \0, and \\),
but the input does not need to be escaped.
* In order for the provider to compare the tables, the output of
mysql -NBe <query> must have \\ substituted with \.
2014-10-09 16:47:31 +02:00
|
|
|
root_password => 'password',
|
2011-05-27 03:11:24 +02:00
|
|
|
}
|
2012-02-09 20:26:00 +01:00
|
|
|
|
2014-04-21 20:21:20 +02:00
|
|
|
mysql_user{ 'redmine@localhost':
|
2012-02-09 20:26:00 +01:00
|
|
|
ensure => present,
|
2011-05-25 08:22:43 +02:00
|
|
|
password_hash => mysql_password('redmine'),
|
2012-02-09 20:26:00 +01:00
|
|
|
require => Class['mysql::server'],
|
2011-05-25 08:22:43 +02:00
|
|
|
}
|
|
|
|
|
2014-04-21 20:21:20 +02:00
|
|
|
mysql_user{ 'dan@localhost':
|
2012-02-09 20:26:00 +01:00
|
|
|
ensure => present,
|
2011-05-25 08:22:43 +02:00
|
|
|
password_hash => mysql_password('blah')
|
|
|
|
}
|
2011-12-05 23:06:25 +01:00
|
|
|
|
2014-04-21 20:21:20 +02:00
|
|
|
mysql_user{ 'dan@%':
|
2012-02-09 20:26:00 +01:00
|
|
|
ensure => present,
|
2011-12-05 23:06:25 +01:00
|
|
|
password_hash => mysql_password('blah'),
|
|
|
|
}
|