You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-16Lines changed: 29 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
*[Customizing Server Options](#customizing-server-options)
11
11
*[Creating a Database](#creating-a-database)
12
12
*[Custom Configuration](#custom-configuration)
13
+
*[Overriding Mysql Implementation](#overriding-mysql-implementation)
13
14
5.[Reference - An under-the-hood peek at what the module is doing and how](#reference)
14
15
6.[Limitations - OS compatibility, etc.](#limitations)
15
16
7.[Development - Guide for contributing to the module](#development)
@@ -25,7 +26,7 @@ The MySQL module manages both the installation and configuration of MySQL, as we
25
26
### Beginning with MySQL
26
27
27
28
If you want a server installed with the default options you can run
28
-
`include '::mysql::server'`.
29
+
`include '::mysql::server'`.
29
30
30
31
If you need to customize options, such as the root
31
32
password or `/etc/my.cnf` settings, then you must also pass in an override hash:
@@ -63,7 +64,7 @@ For items that you would traditionally represent as
63
64
thing = X
64
65
~~~
65
66
66
-
you can make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. Alternatively, you can pass an array, as `thing => ['value', 'value2']`, or list each `thing => value` separately on separate lines.
67
+
you can make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. Alternatively, you can pass an array, as `thing => ['value', 'value2']`, or list each `thing => value` separately on separate lines.
67
68
68
69
MySQL doesn't care if 'thing' is alone or set to a value; it happily accepts both. To keep an option out of the my.cnf file --- e.g., when using `override_options` to revert to a default value --- you can pass `thing => undef`.
69
70
@@ -152,6 +153,18 @@ server address and credentials. For example:
152
153
When working with a remote server, do *not* use the
153
154
`mysql::server` class in your Puppet manifests.
154
155
156
+
### Overriding Mysql Implementation
157
+
158
+
Depending on the distribution a certain assumption is being made to which flavour of Mysql is to be used by default (Oracle Mysql, MariaDB, ... ).
159
+
160
+
This can be overriden by specifing the provider_override option to the mysql::params class.
161
+
162
+
~~~
163
+
class { 'mysql::params':
164
+
provider_override => 'mysql',
165
+
}
166
+
~~~
167
+
155
168
## Reference
156
169
157
170
### Classes
@@ -209,7 +222,7 @@ The MySQL root password. Puppet attempts to set the root password and update `/r
209
222
210
223
This is required if `create_root_user` or `create_root_my_cnf` are 'true'. If `root_password` is 'UNSET', then `create_root_user` and `create_root_my_cnf` are assumed to be false --- that is, the MySQL root user and `/root/.my.cnf` are not created.
211
224
212
-
Password changes are supported; however, the old password must be set in `/root/.my.cnf`. Effectively, Puppet uses the old password, configured in `/root/my.cnf`, to set the new password in MySQL, and then updates `/root/.my.cnf` with the new password.
225
+
Password changes are supported; however, the old password must be set in `/root/.my.cnf`. Effectively, Puppet uses the old password, configured in `/root/my.cnf`, to set the new password in MySQL, and then updates `/root/.my.cnf` with the new password.
213
226
214
227
##### `old_root_password`
215
228
@@ -293,7 +306,7 @@ The provider to use to manage the service. For Ubuntu, defaults to 'upstart'; ot
293
306
294
307
##### `users`
295
308
296
-
Optional hash of users to create, which are passed to [mysql_user](#mysql_user).
309
+
Optional hash of users to create, which are passed to [mysql_user](#mysql_user).
297
310
298
311
~~~
299
312
users => {
@@ -310,7 +323,7 @@ users => {
310
323
311
324
##### `grants`
312
325
313
-
Optional hash of grants, which are passed to [mysql_grant](#mysql_grant).
326
+
Optional hash of grants, which are passed to [mysql_grant](#mysql_grant).
314
327
315
328
~~~
316
329
grants => {
@@ -434,7 +447,7 @@ The password to create for MySQL monitoring.
434
447
435
448
##### `mysql_monitor_hostname`
436
449
437
-
The hostname from which the monitoring user requests are allowed access.
450
+
The hostname from which the monitoring user requests are allowed access.
438
451
439
452
#### mysql::server::mysqltuner
440
453
@@ -489,11 +502,11 @@ Pass `install_options` array to managed package resources. You must pass the [ap
489
502
##### `client_dev_package_ensure`
490
503
491
504
Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `client_dev => true`.
492
-
505
+
493
506
##### `client_dev_package_name`
494
507
495
508
The name of the client_dev package to install. Only applies if `client_dev => true`.
496
-
509
+
497
510
##### `client_dev_package_provider`
498
511
499
512
The provider to use to install the client_dev package. Only applies if `client_dev => true`.
@@ -537,7 +550,7 @@ The provider to use to install the Perl package. Only applies if `perl_enable =>
537
550
##### `php_package_ensure`
538
551
539
552
Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `php_enable => true`.
540
-
553
+
541
554
##### `php_package_name`
542
555
543
556
The name of the PHP package to install. Only applies if `php_enable => true`.
@@ -607,23 +620,23 @@ mysql_database { 'mysql':
607
620
##### `user`
608
621
609
622
The user for the database you're creating.
610
-
623
+
611
624
##### `password`
612
625
613
626
The password for $user for the database you're creating.
614
627
615
628
##### `dbname`
616
629
617
630
The name of the database to create. Defaults to $name.
618
-
631
+
619
632
##### `charset`
620
633
621
634
The character set for the database. Defaults to 'utf8'.
622
635
623
636
##### `collate`
624
637
625
638
The collation for the database. Defaults to 'utf8_general_ci'.
626
-
639
+
627
640
##### `host`
628
641
629
642
The host to use as part of user@host for grants. Defaults to 'localhost'.
@@ -639,10 +652,10 @@ The path to the sqlfile you want to execute. This can be single file specified a
639
652
##### `enforce_sql`
640
653
641
654
Specify whether executing the sqlfiles should happen on every run. If set to 'false', sqlfiles only run once. Valid values are 'true', 'false'. Defaults to 'false'.
642
-
655
+
643
656
##### `ensure`
644
657
645
-
Specify whether to create the database. Valid values are 'present', 'absent'. Defaults to 'present'.
658
+
Specify whether to create the database. Valid values are 'present', 'absent'. Defaults to 'present'.
646
659
647
660
##### `import_timeout`
648
661
@@ -668,7 +681,7 @@ The CHARACTER SET setting for the database. Defaults to ':utf8'.
668
681
669
682
##### `collate`
670
683
671
-
The COLLATE setting for the database. Defaults to ':utf8_general_ci'.
684
+
The COLLATE setting for the database. Defaults to ':utf8_general_ci'.
672
685
673
686
#### mysql_user
674
687
@@ -751,7 +764,7 @@ Whether the resource is present. Valid values are 'present', 'absent'. Defaults
751
764
752
765
##### `name`
753
766
754
-
Name to describe the grant. Must in a 'user/table' format.
767
+
Name to describe the grant. Must in a 'user/table' format.
0 commit comments