244
|
1 # Reference
|
389
|
2
|
244
|
3 <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
|
|
4
|
|
5 ## Table of Contents
|
|
6
|
389
|
7 ### Classes
|
|
8
|
|
9 #### Public Classes
|
244
|
10
|
443
|
11 * [`mysql::bindings`](#mysql--bindings): Parent class for MySQL bindings.
|
|
12 * [`mysql::client`](#mysql--client): Installs and configures the MySQL client.
|
|
13 * [`mysql::server`](#mysql--server): Installs and configures the MySQL server.
|
|
14 * [`mysql::server::backup`](#mysql--server--backup): Create and manage a MySQL backup.
|
389
|
15
|
|
16 #### Private Classes
|
244
|
17
|
|
18 * `mysql::backup::mysqlbackup`: Manage the mysqlbackup client.
|
|
19 * `mysql::backup::mysqldump`: "Provider" for mysqldump
|
|
20 * `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup/MariaBackup
|
|
21 * `mysql::bindings::client_dev`: Private class for installing client development bindings
|
|
22 * `mysql::bindings::daemon_dev`: Private class for installing daemon development bindings
|
|
23 * `mysql::bindings::java`: Private class for installing java language bindings.
|
|
24 * `mysql::bindings::perl`: Private class for installing perl language bindings.
|
|
25 * `mysql::bindings::php`: Private class for installing php language bindings
|
|
26 * `mysql::bindings::python`: Private class for installing python language bindings
|
|
27 * `mysql::bindings::ruby`: Private class for installing ruby language bindings
|
|
28 * `mysql::client::install`: Private class for MySQL client install.
|
|
29 * `mysql::params`: Params class.
|
|
30 * `mysql::server::account_security`: Private class for ensuring localhost accounts do not exist
|
|
31 * `mysql::server::config`: Private class for MySQL server configuration.
|
|
32 * `mysql::server::install`: Private class for managing MySQL package.
|
|
33 * `mysql::server::installdb`: Builds initial databases on installation.
|
389
|
34 * `mysql::server::managed_dirs`: Binary log configuration requires the mysql user to be present. This must be done after package install.
|
244
|
35 * `mysql::server::providers`: Convenience class to call each of the three providers with the corresponding hashes provided in mysql::server.
|
|
36 * `mysql::server::root_password`: Private class for managing the root password
|
|
37 * `mysql::server::service`: Private class for managing the MySQL service
|
|
38
|
389
|
39 ### Defined types
|
244
|
40
|
443
|
41 * [`mysql::db`](#mysql--db): Create and configure a MySQL database.
|
244
|
42
|
389
|
43 ### Resource types
|
|
44
|
|
45 #### Public Resource types
|
244
|
46
|
|
47 * [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights.
|
389
|
48 * [`mysql_login_path`](#mysql_login_path): Manage a MySQL login path.
|
244
|
49 * [`mysql_plugin`](#mysql_plugin): Manage MySQL plugins.
|
|
50 * [`mysql_user`](#mysql_user): @summary Manage a MySQL user. This includes management of users password as well as privileges.
|
|
51
|
389
|
52 #### Private Resource types
|
244
|
53
|
|
54 * `mysql_database`: Manage a MySQL database.
|
|
55 * `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
|
|
56
|
389
|
57 ### Functions
|
|
58
|
443
|
59 * [`mysql::normalise_and_deepmerge`](#mysql--normalise_and_deepmerge): Recursively merges two or more hashes together, normalises keys with differing use of dashes and underscores.
|
|
60 * [`mysql::password`](#mysql--password): Hash a string as mysql's "PASSWORD()" function would do it
|
|
61 * [`mysql::strip_hash`](#mysql--strip_hash): When given a hash this function strips out all blank entries.
|
389
|
62 * [`mysql_password`](#mysql_password): DEPRECATED. Use the namespaced function [`mysql::password`](#mysqlpassword) instead.
|
|
63
|
|
64 ### Data types
|
|
65
|
443
|
66 * [`Mysql::Options`](#Mysql--Options): A hash of options structured like the override_options, but not merged with the default options.
|
389
|
67
|
|
68 ### Tasks
|
244
|
69
|
|
70 * [`export`](#export): Allows you to backup your database to local file.
|
|
71 * [`sql`](#sql): Allows you to execute arbitary SQL
|
|
72
|
|
73 ## Classes
|
|
74
|
443
|
75 ### <a name="mysql--bindings"></a>`mysql::bindings`
|
244
|
76
|
|
77 Parent class for MySQL bindings.
|
|
78
|
|
79 #### Examples
|
|
80
|
|
81 ##### Install Ruby language bindings
|
|
82
|
|
83 ```puppet
|
|
84 class { 'mysql::bindings':
|
|
85 ruby_enable => true,
|
|
86 ruby_package_ensure => 'present',
|
|
87 ruby_package_name => 'ruby-mysql-2.7.1-1mdv2007.0.sparc.rpm',
|
|
88 ruby_package_provider => 'rpm',
|
|
89 }
|
|
90 ```
|
|
91
|
|
92 #### Parameters
|
|
93
|
389
|
94 The following parameters are available in the `mysql::bindings` class:
|
|
95
|
443
|
96 * [`install_options`](#-mysql--bindings--install_options)
|
|
97 * [`java_enable`](#-mysql--bindings--java_enable)
|
|
98 * [`perl_enable`](#-mysql--bindings--perl_enable)
|
|
99 * [`php_enable`](#-mysql--bindings--php_enable)
|
|
100 * [`python_enable`](#-mysql--bindings--python_enable)
|
|
101 * [`ruby_enable`](#-mysql--bindings--ruby_enable)
|
|
102 * [`client_dev`](#-mysql--bindings--client_dev)
|
|
103 * [`daemon_dev`](#-mysql--bindings--daemon_dev)
|
|
104 * [`java_package_ensure`](#-mysql--bindings--java_package_ensure)
|
|
105 * [`java_package_name`](#-mysql--bindings--java_package_name)
|
|
106 * [`java_package_provider`](#-mysql--bindings--java_package_provider)
|
|
107 * [`perl_package_ensure`](#-mysql--bindings--perl_package_ensure)
|
|
108 * [`perl_package_name`](#-mysql--bindings--perl_package_name)
|
|
109 * [`perl_package_provider`](#-mysql--bindings--perl_package_provider)
|
|
110 * [`php_package_ensure`](#-mysql--bindings--php_package_ensure)
|
|
111 * [`php_package_name`](#-mysql--bindings--php_package_name)
|
|
112 * [`php_package_provider`](#-mysql--bindings--php_package_provider)
|
|
113 * [`python_package_ensure`](#-mysql--bindings--python_package_ensure)
|
|
114 * [`python_package_name`](#-mysql--bindings--python_package_name)
|
|
115 * [`python_package_provider`](#-mysql--bindings--python_package_provider)
|
|
116 * [`ruby_package_ensure`](#-mysql--bindings--ruby_package_ensure)
|
|
117 * [`ruby_package_name`](#-mysql--bindings--ruby_package_name)
|
|
118 * [`ruby_package_provider`](#-mysql--bindings--ruby_package_provider)
|
|
119 * [`client_dev_package_ensure`](#-mysql--bindings--client_dev_package_ensure)
|
|
120 * [`client_dev_package_name`](#-mysql--bindings--client_dev_package_name)
|
|
121 * [`client_dev_package_provider`](#-mysql--bindings--client_dev_package_provider)
|
|
122 * [`daemon_dev_package_ensure`](#-mysql--bindings--daemon_dev_package_ensure)
|
|
123 * [`daemon_dev_package_name`](#-mysql--bindings--daemon_dev_package_name)
|
|
124 * [`daemon_dev_package_provider`](#-mysql--bindings--daemon_dev_package_provider)
|
|
125
|
|
126 ##### <a name="-mysql--bindings--install_options"></a>`install_options`
|
244
|
127
|
|
128 Data type: `Any`
|
|
129
|
|
130 Passes `install_options` array to managed package resources. You must pass the [appropriate options](https://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options) for the package manager(s).
|
|
131
|
443
|
132 Default value: `undef`
|
|
133
|
|
134 ##### <a name="-mysql--bindings--java_enable"></a>`java_enable`
|
244
|
135
|
|
136 Data type: `Any`
|
|
137
|
|
138 Specifies whether `::mysql::bindings::java` should be included. Valid values are `true`, `false`.
|
|
139
|
443
|
140 Default value: `false`
|
|
141
|
|
142 ##### <a name="-mysql--bindings--perl_enable"></a>`perl_enable`
|
244
|
143
|
|
144 Data type: `Any`
|
|
145
|
|
146 Specifies whether `mysql::bindings::perl` should be included. Valid values are `true`, `false`.
|
|
147
|
443
|
148 Default value: `false`
|
|
149
|
|
150 ##### <a name="-mysql--bindings--php_enable"></a>`php_enable`
|
244
|
151
|
|
152 Data type: `Any`
|
|
153
|
|
154 Specifies whether `mysql::bindings::php` should be included. Valid values are `true`, `false`.
|
|
155
|
443
|
156 Default value: `false`
|
|
157
|
|
158 ##### <a name="-mysql--bindings--python_enable"></a>`python_enable`
|
244
|
159
|
|
160 Data type: `Any`
|
|
161
|
|
162 Specifies whether `mysql::bindings::python` should be included. Valid values are `true`, `false`.
|
|
163
|
443
|
164 Default value: `false`
|
|
165
|
|
166 ##### <a name="-mysql--bindings--ruby_enable"></a>`ruby_enable`
|
244
|
167
|
|
168 Data type: `Any`
|
|
169
|
|
170 Specifies whether `mysql::bindings::ruby` should be included. Valid values are `true`, `false`.
|
|
171
|
443
|
172 Default value: `false`
|
|
173
|
|
174 ##### <a name="-mysql--bindings--client_dev"></a>`client_dev`
|
244
|
175
|
|
176 Data type: `Any`
|
|
177
|
|
178 Specifies whether `::mysql::bindings::client_dev` should be included. Valid values are `true`', `false`.
|
|
179
|
443
|
180 Default value: `false`
|
|
181
|
|
182 ##### <a name="-mysql--bindings--daemon_dev"></a>`daemon_dev`
|
244
|
183
|
|
184 Data type: `Any`
|
|
185
|
|
186 Specifies whether `::mysql::bindings::daemon_dev` should be included. Valid values are `true`, `false`.
|
|
187
|
443
|
188 Default value: `false`
|
|
189
|
|
190 ##### <a name="-mysql--bindings--java_package_ensure"></a>`java_package_ensure`
|
244
|
191
|
|
192 Data type: `Any`
|
|
193
|
|
194 Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `java_enable => true`.
|
|
195
|
389
|
196 Default value: `$mysql::params::java_package_ensure`
|
|
197
|
443
|
198 ##### <a name="-mysql--bindings--java_package_name"></a>`java_package_name`
|
244
|
199
|
|
200 Data type: `Any`
|
|
201
|
|
202 The name of the Java package to install. Only applies if `java_enable => true`.
|
|
203
|
389
|
204 Default value: `$mysql::params::java_package_name`
|
|
205
|
443
|
206 ##### <a name="-mysql--bindings--java_package_provider"></a>`java_package_provider`
|
244
|
207
|
|
208 Data type: `Any`
|
|
209
|
|
210 The provider to use to install the Java package. Only applies if `java_enable => true`.
|
|
211
|
389
|
212 Default value: `$mysql::params::java_package_provider`
|
|
213
|
443
|
214 ##### <a name="-mysql--bindings--perl_package_ensure"></a>`perl_package_ensure`
|
244
|
215
|
|
216 Data type: `Any`
|
|
217
|
|
218 Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `perl_enable => true`.
|
|
219
|
389
|
220 Default value: `$mysql::params::perl_package_ensure`
|
|
221
|
443
|
222 ##### <a name="-mysql--bindings--perl_package_name"></a>`perl_package_name`
|
244
|
223
|
|
224 Data type: `Any`
|
|
225
|
|
226 The name of the Perl package to install. Only applies if `perl_enable => true`.
|
|
227
|
389
|
228 Default value: `$mysql::params::perl_package_name`
|
|
229
|
443
|
230 ##### <a name="-mysql--bindings--perl_package_provider"></a>`perl_package_provider`
|
244
|
231
|
|
232 Data type: `Any`
|
|
233
|
|
234 The provider to use to install the Perl package. Only applies if `perl_enable => true`.
|
|
235
|
389
|
236 Default value: `$mysql::params::perl_package_provider`
|
|
237
|
443
|
238 ##### <a name="-mysql--bindings--php_package_ensure"></a>`php_package_ensure`
|
244
|
239
|
|
240 Data type: `Any`
|
|
241
|
|
242 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`.
|
|
243
|
389
|
244 Default value: `$mysql::params::php_package_ensure`
|
|
245
|
443
|
246 ##### <a name="-mysql--bindings--php_package_name"></a>`php_package_name`
|
244
|
247
|
|
248 Data type: `Any`
|
|
249
|
|
250 The name of the PHP package to install. Only applies if `php_enable => true`.
|
|
251
|
389
|
252 Default value: `$mysql::params::php_package_name`
|
|
253
|
443
|
254 ##### <a name="-mysql--bindings--php_package_provider"></a>`php_package_provider`
|
244
|
255
|
|
256 Data type: `Any`
|
|
257
|
|
258 The provider to use to install the PHP package. Only applies if `php_enable => true`.
|
|
259
|
389
|
260 Default value: `$mysql::params::php_package_provider`
|
|
261
|
443
|
262 ##### <a name="-mysql--bindings--python_package_ensure"></a>`python_package_ensure`
|
244
|
263
|
|
264 Data type: `Any`
|
|
265
|
|
266 Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `python_enable => true`.
|
|
267
|
389
|
268 Default value: `$mysql::params::python_package_ensure`
|
|
269
|
443
|
270 ##### <a name="-mysql--bindings--python_package_name"></a>`python_package_name`
|
244
|
271
|
|
272 Data type: `Any`
|
|
273
|
|
274 The name of the Python package to install. Only applies if `python_enable => true`.
|
|
275
|
389
|
276 Default value: `$mysql::params::python_package_name`
|
|
277
|
443
|
278 ##### <a name="-mysql--bindings--python_package_provider"></a>`python_package_provider`
|
244
|
279
|
|
280 Data type: `Any`
|
|
281
|
|
282 The provider to use to install the Python package. Only applies if `python_enable => true`.
|
|
283
|
389
|
284 Default value: `$mysql::params::python_package_provider`
|
|
285
|
443
|
286 ##### <a name="-mysql--bindings--ruby_package_ensure"></a>`ruby_package_ensure`
|
244
|
287
|
|
288 Data type: `Any`
|
|
289
|
|
290 Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `ruby_enable => true`.
|
|
291
|
389
|
292 Default value: `$mysql::params::ruby_package_ensure`
|
|
293
|
443
|
294 ##### <a name="-mysql--bindings--ruby_package_name"></a>`ruby_package_name`
|
244
|
295
|
|
296 Data type: `Any`
|
|
297
|
|
298 The name of the Ruby package to install. Only applies if `ruby_enable => true`.
|
|
299
|
389
|
300 Default value: `$mysql::params::ruby_package_name`
|
|
301
|
443
|
302 ##### <a name="-mysql--bindings--ruby_package_provider"></a>`ruby_package_provider`
|
244
|
303
|
|
304 Data type: `Any`
|
|
305
|
|
306 What provider should be used to install the package.
|
|
307
|
389
|
308 Default value: `$mysql::params::ruby_package_provider`
|
|
309
|
443
|
310 ##### <a name="-mysql--bindings--client_dev_package_ensure"></a>`client_dev_package_ensure`
|
244
|
311
|
|
312 Data type: `Any`
|
|
313
|
|
314 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`.
|
|
315
|
389
|
316 Default value: `$mysql::params::client_dev_package_ensure`
|
|
317
|
443
|
318 ##### <a name="-mysql--bindings--client_dev_package_name"></a>`client_dev_package_name`
|
244
|
319
|
|
320 Data type: `Any`
|
|
321
|
|
322 The name of the client_dev package to install. Only applies if `client_dev => true`.
|
|
323
|
389
|
324 Default value: `$mysql::params::client_dev_package_name`
|
|
325
|
443
|
326 ##### <a name="-mysql--bindings--client_dev_package_provider"></a>`client_dev_package_provider`
|
244
|
327
|
|
328 Data type: `Any`
|
|
329
|
|
330 The provider to use to install the client_dev package. Only applies if `client_dev => true`.
|
|
331
|
389
|
332 Default value: `$mysql::params::client_dev_package_provider`
|
|
333
|
443
|
334 ##### <a name="-mysql--bindings--daemon_dev_package_ensure"></a>`daemon_dev_package_ensure`
|
244
|
335
|
|
336 Data type: `Any`
|
|
337
|
|
338 Whether the package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Only applies if `daemon_dev => true`.
|
|
339
|
389
|
340 Default value: `$mysql::params::daemon_dev_package_ensure`
|
|
341
|
443
|
342 ##### <a name="-mysql--bindings--daemon_dev_package_name"></a>`daemon_dev_package_name`
|
244
|
343
|
|
344 Data type: `Any`
|
|
345
|
|
346 The name of the daemon_dev package to install. Only applies if `daemon_dev => true`.
|
|
347
|
389
|
348 Default value: `$mysql::params::daemon_dev_package_name`
|
|
349
|
443
|
350 ##### <a name="-mysql--bindings--daemon_dev_package_provider"></a>`daemon_dev_package_provider`
|
244
|
351
|
|
352 Data type: `Any`
|
|
353
|
|
354 The provider to use to install the daemon_dev package. Only applies if `daemon_dev => true`.
|
|
355
|
389
|
356 Default value: `$mysql::params::daemon_dev_package_provider`
|
|
357
|
443
|
358 ### <a name="mysql--client"></a>`mysql::client`
|
244
|
359
|
|
360 Installs and configures the MySQL client.
|
|
361
|
|
362 #### Examples
|
|
363
|
|
364 ##### Install the MySQL client
|
|
365
|
|
366 ```puppet
|
|
367 class {'::mysql::client':
|
|
368 package_name => 'mysql-client',
|
|
369 package_ensure => 'present',
|
|
370 bindings_enable => true,
|
|
371 }
|
|
372 ```
|
|
373
|
|
374 #### Parameters
|
|
375
|
389
|
376 The following parameters are available in the `mysql::client` class:
|
|
377
|
443
|
378 * [`bindings_enable`](#-mysql--client--bindings_enable)
|
|
379 * [`install_options`](#-mysql--client--install_options)
|
|
380 * [`package_ensure`](#-mysql--client--package_ensure)
|
|
381 * [`package_manage`](#-mysql--client--package_manage)
|
|
382 * [`package_name`](#-mysql--client--package_name)
|
|
383 * [`package_provider`](#-mysql--client--package_provider)
|
|
384 * [`package_source`](#-mysql--client--package_source)
|
|
385
|
|
386 ##### <a name="-mysql--client--bindings_enable"></a>`bindings_enable`
|
244
|
387
|
|
388 Data type: `Any`
|
|
389
|
|
390 Whether to automatically install all bindings. Valid values are `true`, `false`. Default to `false`.
|
|
391
|
389
|
392 Default value: `$mysql::params::bindings_enable`
|
|
393
|
443
|
394 ##### <a name="-mysql--client--install_options"></a>`install_options`
|
244
|
395
|
|
396 Data type: `Any`
|
|
397
|
|
398 Array of install options for managed package resources. You must pass the appropriate options for the package manager.
|
|
399
|
443
|
400 Default value: `undef`
|
|
401
|
|
402 ##### <a name="-mysql--client--package_ensure"></a>`package_ensure`
|
244
|
403
|
|
404 Data type: `Any`
|
|
405
|
|
406 Whether the MySQL package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'.
|
|
407
|
389
|
408 Default value: `$mysql::params::client_package_ensure`
|
|
409
|
443
|
410 ##### <a name="-mysql--client--package_manage"></a>`package_manage`
|
244
|
411
|
|
412 Data type: `Any`
|
|
413
|
|
414 Whether to manage the MySQL client package. Defaults to `true`.
|
|
415
|
389
|
416 Default value: `$mysql::params::client_package_manage`
|
|
417
|
443
|
418 ##### <a name="-mysql--client--package_name"></a>`package_name`
|
244
|
419
|
|
420 Data type: `Any`
|
|
421
|
|
422 The name of the MySQL client package to install.
|
|
423
|
389
|
424 Default value: `$mysql::params::client_package_name`
|
|
425
|
443
|
426 ##### <a name="-mysql--client--package_provider"></a>`package_provider`
|
389
|
427
|
|
428 Data type: `Any`
|
|
429
|
|
430
|
|
431
|
443
|
432 Default value: `undef`
|
|
433
|
|
434 ##### <a name="-mysql--client--package_source"></a>`package_source`
|
389
|
435
|
|
436 Data type: `Any`
|
|
437
|
|
438
|
|
439
|
443
|
440 Default value: `undef`
|
|
441
|
|
442 ### <a name="mysql--server"></a>`mysql::server`
|
244
|
443
|
|
444 Installs and configures the MySQL server.
|
|
445
|
|
446 #### Examples
|
|
447
|
|
448 ##### Install MySQL Server
|
|
449
|
|
450 ```puppet
|
|
451 class { '::mysql::server':
|
|
452 package_name => 'mysql-server',
|
|
453 package_ensure => '5.7.1+mysql~trusty',
|
|
454 root_password => 'strongpassword',
|
|
455 remove_default_accounts => true,
|
|
456 }
|
|
457 ```
|
|
458
|
|
459 #### Parameters
|
|
460
|
389
|
461 The following parameters are available in the `mysql::server` class:
|
|
462
|
443
|
463 * [`config_file`](#-mysql--server--config_file)
|
|
464 * [`config_file_mode`](#-mysql--server--config_file_mode)
|
|
465 * [`includedir`](#-mysql--server--includedir)
|
|
466 * [`install_options`](#-mysql--server--install_options)
|
|
467 * [`manage_config_file`](#-mysql--server--manage_config_file)
|
|
468 * [`options`](#-mysql--server--options)
|
|
469 * [`override_options`](#-mysql--server--override_options)
|
|
470 * [`package_ensure`](#-mysql--server--package_ensure)
|
|
471 * [`package_manage`](#-mysql--server--package_manage)
|
|
472 * [`package_name`](#-mysql--server--package_name)
|
|
473 * [`package_provider`](#-mysql--server--package_provider)
|
|
474 * [`package_source`](#-mysql--server--package_source)
|
|
475 * [`purge_conf_dir`](#-mysql--server--purge_conf_dir)
|
|
476 * [`remove_default_accounts`](#-mysql--server--remove_default_accounts)
|
|
477 * [`restart`](#-mysql--server--restart)
|
|
478 * [`root_group`](#-mysql--server--root_group)
|
|
479 * [`mysql_group`](#-mysql--server--mysql_group)
|
|
480 * [`mycnf_owner`](#-mysql--server--mycnf_owner)
|
|
481 * [`mycnf_group`](#-mysql--server--mycnf_group)
|
|
482 * [`root_password`](#-mysql--server--root_password)
|
|
483 * [`service_enabled`](#-mysql--server--service_enabled)
|
|
484 * [`service_manage`](#-mysql--server--service_manage)
|
|
485 * [`service_name`](#-mysql--server--service_name)
|
|
486 * [`service_provider`](#-mysql--server--service_provider)
|
|
487 * [`create_root_user`](#-mysql--server--create_root_user)
|
|
488 * [`create_root_my_cnf`](#-mysql--server--create_root_my_cnf)
|
|
489 * [`users`](#-mysql--server--users)
|
|
490 * [`grants`](#-mysql--server--grants)
|
|
491 * [`databases`](#-mysql--server--databases)
|
|
492 * [`enabled`](#-mysql--server--enabled)
|
|
493 * [`manage_service`](#-mysql--server--manage_service)
|
|
494 * [`old_root_password`](#-mysql--server--old_root_password)
|
|
495 * [`managed_dirs`](#-mysql--server--managed_dirs)
|
|
496 * [`create_root_login_file`](#-mysql--server--create_root_login_file)
|
|
497 * [`login_file`](#-mysql--server--login_file)
|
|
498
|
|
499 ##### <a name="-mysql--server--config_file"></a>`config_file`
|
244
|
500
|
|
501 Data type: `Any`
|
|
502
|
|
503 The location, as a path, of the MySQL configuration file.
|
|
504
|
389
|
505 Default value: `$mysql::params::config_file`
|
|
506
|
443
|
507 ##### <a name="-mysql--server--config_file_mode"></a>`config_file_mode`
|
389
|
508
|
|
509 Data type: `Any`
|
|
510
|
|
511 The MySQL configuration file's permissions mode.
|
|
512
|
|
513 Default value: `$mysql::params::config_file_mode`
|
|
514
|
443
|
515 ##### <a name="-mysql--server--includedir"></a>`includedir`
|
244
|
516
|
|
517 Data type: `Any`
|
|
518
|
|
519 The location, as a path, of !includedir for custom configuration overrides.
|
|
520
|
389
|
521 Default value: `$mysql::params::includedir`
|
|
522
|
443
|
523 ##### <a name="-mysql--server--install_options"></a>`install_options`
|
244
|
524
|
|
525 Data type: `Any`
|
|
526
|
|
527 Passes [install_options](https://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options) array to managed package resources. You must pass the appropriate options for the specified package manager
|
|
528
|
443
|
529 Default value: `undef`
|
|
530
|
|
531 ##### <a name="-mysql--server--manage_config_file"></a>`manage_config_file`
|
244
|
532
|
|
533 Data type: `Any`
|
|
534
|
|
535 Whether the MySQL configuration file should be managed. Valid values are `true`, `false`. Defaults to `true`.
|
|
536
|
389
|
537 Default value: `$mysql::params::manage_config_file`
|
|
538
|
443
|
539 ##### <a name="-mysql--server--options"></a>`options`
|
389
|
540
|
|
541 Data type: `Mysql::Options`
|
|
542
|
|
543 A hash of options structured like the override_options, but not merged with the default options. Use this if you don't want your options merged with the default options.
|
|
544
|
|
545 Default value: `{}`
|
|
546
|
443
|
547 ##### <a name="-mysql--server--override_options"></a>`override_options`
|
244
|
548
|
|
549 Data type: `Any`
|
|
550
|
|
551 Specifies override options to pass into MySQL. Structured like a hash in the my.cnf file: See above for usage details.
|
|
552
|
389
|
553 Default value: `{}`
|
|
554
|
443
|
555 ##### <a name="-mysql--server--package_ensure"></a>`package_ensure`
|
244
|
556
|
|
557 Data type: `Any`
|
|
558
|
|
559 Whether the package exists or should be a specific version. Valid values are 'present', 'absent', or 'x.y.z'. Defaults to 'present'.
|
|
560
|
389
|
561 Default value: `$mysql::params::server_package_ensure`
|
|
562
|
443
|
563 ##### <a name="-mysql--server--package_manage"></a>`package_manage`
|
244
|
564
|
|
565 Data type: `Any`
|
|
566
|
|
567 Whether to manage the MySQL server package. Defaults to `true`.
|
|
568
|
389
|
569 Default value: `$mysql::params::server_package_manage`
|
|
570
|
443
|
571 ##### <a name="-mysql--server--package_name"></a>`package_name`
|
244
|
572
|
|
573 Data type: `Any`
|
|
574
|
|
575 The name of the MySQL server package to install.
|
|
576
|
389
|
577 Default value: `$mysql::params::server_package_name`
|
|
578
|
443
|
579 ##### <a name="-mysql--server--package_provider"></a>`package_provider`
|
389
|
580
|
|
581 Data type: `Any`
|
|
582
|
|
583 Define a specific provider for package install.
|
|
584
|
443
|
585 Default value: `undef`
|
|
586
|
|
587 ##### <a name="-mysql--server--package_source"></a>`package_source`
|
389
|
588
|
|
589 Data type: `Any`
|
|
590
|
|
591 The location of the package source (require for some package provider)
|
|
592
|
443
|
593 Default value: `undef`
|
|
594
|
|
595 ##### <a name="-mysql--server--purge_conf_dir"></a>`purge_conf_dir`
|
244
|
596
|
|
597 Data type: `Any`
|
|
598
|
|
599 Whether the `includedir` directory should be purged. Valid values are `true`, `false`. Defaults to `false`.
|
|
600
|
389
|
601 Default value: `$mysql::params::purge_conf_dir`
|
|
602
|
443
|
603 ##### <a name="-mysql--server--remove_default_accounts"></a>`remove_default_accounts`
|
244
|
604
|
|
605 Data type: `Any`
|
|
606
|
|
607 Specifies whether to automatically include `mysql::server::account_security`. Valid values are `true`, `false`. Defaults to `false`.
|
|
608
|
443
|
609 Default value: `false`
|
|
610
|
|
611 ##### <a name="-mysql--server--restart"></a>`restart`
|
244
|
612
|
|
613 Data type: `Any`
|
|
614
|
|
615 Whether the service should be restarted when things change. Valid values are `true`, `false`. Defaults to `false`.
|
|
616
|
389
|
617 Default value: `$mysql::params::restart`
|
|
618
|
443
|
619 ##### <a name="-mysql--server--root_group"></a>`root_group`
|
244
|
620
|
|
621 Data type: `Any`
|
|
622
|
|
623 The name of the group used for root. Can be a group name or a group ID. See more about the [group](https://docs.puppetlabs.com/references/latest/type.html#file-attribute-group).
|
|
624
|
389
|
625 Default value: `$mysql::params::root_group`
|
|
626
|
443
|
627 ##### <a name="-mysql--server--mysql_group"></a>`mysql_group`
|
244
|
628
|
|
629 Data type: `Any`
|
|
630
|
|
631 The name of the group of the MySQL daemon user. Can be a group name or a group ID. See more about the [group](https://docs.puppetlabs.com/references/latest/type.html#file-attribute-group).
|
|
632
|
389
|
633 Default value: `$mysql::params::mysql_group`
|
|
634
|
443
|
635 ##### <a name="-mysql--server--mycnf_owner"></a>`mycnf_owner`
|
389
|
636
|
|
637 Data type: `Any`
|
|
638
|
|
639 Name or user-id who owns the mysql-config-file.
|
|
640
|
|
641 Default value: `$mysql::params::mycnf_owner`
|
|
642
|
443
|
643 ##### <a name="-mysql--server--mycnf_group"></a>`mycnf_group`
|
244
|
644
|
|
645 Data type: `Any`
|
|
646
|
389
|
647 Name or group-id which owns the mysql-config-file.
|
|
648
|
|
649 Default value: `$mysql::params::mycnf_group`
|
|
650
|
443
|
651 ##### <a name="-mysql--server--root_password"></a>`root_password`
|
389
|
652
|
|
653 Data type: `Variant[String, Sensitive[String]]`
|
|
654
|
244
|
655 The MySQL root password. Puppet attempts to set the root password and update `/root/.my.cnf` with it. 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. 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.
|
|
656
|
389
|
657 Default value: `$mysql::params::root_password`
|
|
658
|
443
|
659 ##### <a name="-mysql--server--service_enabled"></a>`service_enabled`
|
244
|
660
|
|
661 Data type: `Any`
|
|
662
|
|
663 Specifies whether the service should be enabled. Valid values are `true`, `false`. Defaults to `true`.
|
|
664
|
389
|
665 Default value: `$mysql::params::server_service_enabled`
|
|
666
|
443
|
667 ##### <a name="-mysql--server--service_manage"></a>`service_manage`
|
244
|
668
|
|
669 Data type: `Any`
|
|
670
|
|
671 Specifies whether the service should be managed. Valid values are `true`, `false`. Defaults to `true`.
|
|
672
|
389
|
673 Default value: `$mysql::params::server_service_manage`
|
|
674
|
443
|
675 ##### <a name="-mysql--server--service_name"></a>`service_name`
|
244
|
676
|
|
677 Data type: `Any`
|
|
678
|
|
679 The name of the MySQL server service. Defaults are OS dependent, defined in 'params.pp'.
|
|
680
|
389
|
681 Default value: `$mysql::params::server_service_name`
|
|
682
|
443
|
683 ##### <a name="-mysql--server--service_provider"></a>`service_provider`
|
244
|
684
|
|
685 Data type: `Any`
|
|
686
|
|
687 The provider to use to manage the service. For Ubuntu, defaults to 'upstart'; otherwise, default is undefined.
|
|
688
|
389
|
689 Default value: `$mysql::params::server_service_provider`
|
|
690
|
443
|
691 ##### <a name="-mysql--server--create_root_user"></a>`create_root_user`
|
244
|
692
|
|
693 Data type: `Any`
|
|
694
|
|
695 Whether root user should be created. Valid values are `true`, `false`. Defaults to `true`. This is useful for a cluster setup with Galera. The root user has to be created only once. You can set this parameter true on one node and set it to false on the remaining nodes.
|
|
696
|
389
|
697 Default value: `$mysql::params::create_root_user`
|
|
698
|
443
|
699 ##### <a name="-mysql--server--create_root_my_cnf"></a>`create_root_my_cnf`
|
244
|
700
|
|
701 Data type: `Any`
|
|
702
|
|
703 Whether to create `/root/.my.cnf`. Valid values are `true`, `false`. Defaults to `true`. `create_root_my_cnf` allows creation of `/root/.my.cnf` independently of `create_root_user`. You can use this for a cluster setup with Galera where you want `/root/.my.cnf` to exist on all nodes.
|
|
704
|
389
|
705 Default value: `$mysql::params::create_root_my_cnf`
|
|
706
|
443
|
707 ##### <a name="-mysql--server--users"></a>`users`
|
244
|
708
|
|
709 Data type: `Any`
|
|
710
|
|
711 Optional hash of users to create, which are passed to [mysql_user](#mysql_user).
|
|
712
|
389
|
713 Default value: `{}`
|
|
714
|
443
|
715 ##### <a name="-mysql--server--grants"></a>`grants`
|
244
|
716
|
|
717 Data type: `Any`
|
|
718
|
|
719 Optional hash of grants, which are passed to [mysql_grant](#mysql_grant).
|
|
720
|
389
|
721 Default value: `{}`
|
|
722
|
443
|
723 ##### <a name="-mysql--server--databases"></a>`databases`
|
244
|
724
|
|
725 Data type: `Any`
|
|
726
|
|
727 Optional hash of databases to create, which are passed to [mysql_database](#mysql_database).
|
|
728
|
389
|
729 Default value: `{}`
|
|
730
|
443
|
731 ##### <a name="-mysql--server--enabled"></a>`enabled`
|
244
|
732
|
|
733 Data type: `Any`
|
|
734
|
|
735 _Deprecated_
|
|
736
|
443
|
737 Default value: `undef`
|
|
738
|
|
739 ##### <a name="-mysql--server--manage_service"></a>`manage_service`
|
244
|
740
|
|
741 Data type: `Any`
|
|
742
|
|
743 _Deprecated_
|
|
744
|
443
|
745 Default value: `undef`
|
|
746
|
|
747 ##### <a name="-mysql--server--old_root_password"></a>`old_root_password`
|
244
|
748
|
|
749 Data type: `Any`
|
|
750
|
|
751 This parameter no longer does anything. It exists only for backwards compatibility. See the `root_password` parameter above for details on changing the root password.
|
|
752
|
443
|
753 Default value: `undef`
|
|
754
|
|
755 ##### <a name="-mysql--server--managed_dirs"></a>`managed_dirs`
|
389
|
756
|
|
757 Data type: `Any`
|
|
758
|
|
759
|
|
760
|
|
761 Default value: `$mysql::params::managed_dirs`
|
|
762
|
443
|
763 ##### <a name="-mysql--server--create_root_login_file"></a>`create_root_login_file`
|
244
|
764
|
|
765 Data type: `Any`
|
|
766
|
|
767
|
|
768
|
389
|
769 Default value: `$mysql::params::create_root_login_file`
|
|
770
|
443
|
771 ##### <a name="-mysql--server--login_file"></a>`login_file`
|
244
|
772
|
|
773 Data type: `Any`
|
|
774
|
|
775
|
|
776
|
389
|
777 Default value: `$mysql::params::login_file`
|
|
778
|
443
|
779 ### <a name="mysql--server--backup"></a>`mysql::server::backup`
|
244
|
780
|
|
781 Create and manage a MySQL backup.
|
|
782
|
|
783 #### Examples
|
|
784
|
|
785 ##### Create a basic MySQL backup:
|
|
786
|
|
787 ```puppet
|
|
788 class { 'mysql::server':
|
443
|
789 root_password => 'password'
|
244
|
790 }
|
|
791 class { 'mysql::server::backup':
|
443
|
792 backupuser => 'myuser',
|
|
793 backuppassword => 'mypassword',
|
|
794 backupdir => '/tmp/backups',
|
|
795 }
|
|
796 ```
|
|
797
|
|
798 ##### Create a basic MySQL backup using mariabackup:
|
|
799
|
|
800 ```puppet
|
|
801 class { 'mysql::server':
|
|
802 root_password => 'password'
|
244
|
803 }
|
|
804 class { 'mysql::server::backup':
|
443
|
805 backupmethod => 'mariabackup',
|
|
806 backupmethod_package => 'mariadb-backup'
|
|
807 provider => 'xtrabackup',
|
|
808 backupdir => '/tmp/backups',
|
244
|
809 }
|
|
810 ```
|
|
811
|
|
812 #### Parameters
|
|
813
|
389
|
814 The following parameters are available in the `mysql::server::backup` class:
|
|
815
|
443
|
816 * [`backupuser`](#-mysql--server--backup--backupuser)
|
|
817 * [`backuppassword`](#-mysql--server--backup--backuppassword)
|
|
818 * [`backupdir`](#-mysql--server--backup--backupdir)
|
|
819 * [`backupdirmode`](#-mysql--server--backup--backupdirmode)
|
|
820 * [`backupdirowner`](#-mysql--server--backup--backupdirowner)
|
|
821 * [`backupdirgroup`](#-mysql--server--backup--backupdirgroup)
|
|
822 * [`backupcompress`](#-mysql--server--backup--backupcompress)
|
|
823 * [`backupmethod`](#-mysql--server--backup--backupmethod)
|
|
824 * [`backup_success_file_path`](#-mysql--server--backup--backup_success_file_path)
|
|
825 * [`backuprotate`](#-mysql--server--backup--backuprotate)
|
|
826 * [`ignore_events`](#-mysql--server--backup--ignore_events)
|
|
827 * [`delete_before_dump`](#-mysql--server--backup--delete_before_dump)
|
|
828 * [`backupdatabases`](#-mysql--server--backup--backupdatabases)
|
|
829 * [`file_per_database`](#-mysql--server--backup--file_per_database)
|
|
830 * [`include_routines`](#-mysql--server--backup--include_routines)
|
|
831 * [`include_triggers`](#-mysql--server--backup--include_triggers)
|
|
832 * [`incremental_backups`](#-mysql--server--backup--incremental_backups)
|
|
833 * [`ensure`](#-mysql--server--backup--ensure)
|
|
834 * [`time`](#-mysql--server--backup--time)
|
|
835 * [`prescript`](#-mysql--server--backup--prescript)
|
|
836 * [`postscript`](#-mysql--server--backup--postscript)
|
|
837 * [`execpath`](#-mysql--server--backup--execpath)
|
|
838 * [`provider`](#-mysql--server--backup--provider)
|
|
839 * [`maxallowedpacket`](#-mysql--server--backup--maxallowedpacket)
|
|
840 * [`optional_args`](#-mysql--server--backup--optional_args)
|
|
841 * [`install_cron`](#-mysql--server--backup--install_cron)
|
|
842 * [`compression_command`](#-mysql--server--backup--compression_command)
|
|
843 * [`compression_extension`](#-mysql--server--backup--compression_extension)
|
|
844 * [`backupmethod_package`](#-mysql--server--backup--backupmethod_package)
|
|
845 * [`excludedatabases`](#-mysql--server--backup--excludedatabases)
|
|
846
|
|
847 ##### <a name="-mysql--server--backup--backupuser"></a>`backupuser`
|
244
|
848
|
|
849 Data type: `Any`
|
|
850
|
389
|
851 MySQL user to create with backup administrator privileges.
|
|
852
|
443
|
853 Default value: `undef`
|
|
854
|
|
855 ##### <a name="-mysql--server--backup--backuppassword"></a>`backuppassword`
|
389
|
856
|
|
857 Data type: `Optional[Variant[String, Sensitive[String]]]`
|
|
858
|
|
859 Password to create for `backupuser`.
|
|
860
|
443
|
861 Default value: `undef`
|
|
862
|
|
863 ##### <a name="-mysql--server--backup--backupdir"></a>`backupdir`
|
244
|
864
|
|
865 Data type: `Any`
|
|
866
|
|
867 Directory to store backup.
|
|
868
|
443
|
869 Default value: `undef`
|
|
870
|
|
871 ##### <a name="-mysql--server--backup--backupdirmode"></a>`backupdirmode`
|
244
|
872
|
|
873 Data type: `Any`
|
|
874
|
|
875 Permissions applied to the backup directory. This parameter is passed directly to the file resource.
|
|
876
|
389
|
877 Default value: `'0700'`
|
|
878
|
443
|
879 ##### <a name="-mysql--server--backup--backupdirowner"></a>`backupdirowner`
|
244
|
880
|
|
881 Data type: `Any`
|
|
882
|
|
883 Owner for the backup directory. This parameter is passed directly to the file resource.
|
|
884
|
389
|
885 Default value: `'root'`
|
|
886
|
443
|
887 ##### <a name="-mysql--server--backup--backupdirgroup"></a>`backupdirgroup`
|
244
|
888
|
|
889 Data type: `Any`
|
|
890
|
|
891 Group owner for the backup directory. This parameter is passed directly to the file resource.
|
|
892
|
389
|
893 Default value: `$mysql::params::root_group`
|
|
894
|
443
|
895 ##### <a name="-mysql--server--backup--backupcompress"></a>`backupcompress`
|
244
|
896
|
|
897 Data type: `Any`
|
|
898
|
389
|
899 Whether or not to compress the backup (when using the mysqldump or xtrabackup provider)
|
|
900
|
443
|
901 Default value: `true`
|
|
902
|
|
903 ##### <a name="-mysql--server--backup--backupmethod"></a>`backupmethod`
|
244
|
904
|
|
905 Data type: `Any`
|
|
906
|
|
907 The execution binary for backing up. ex. mysqldump, xtrabackup, mariabackup
|
|
908
|
443
|
909 Default value: `undef`
|
|
910
|
|
911 ##### <a name="-mysql--server--backup--backup_success_file_path"></a>`backup_success_file_path`
|
244
|
912
|
|
913 Data type: `Any`
|
|
914
|
|
915 Specify a path where upon successfull backup a file should be created for checking purposes.
|
|
916
|
389
|
917 Default value: `'/tmp/mysqlbackup_success'`
|
|
918
|
443
|
919 ##### <a name="-mysql--server--backup--backuprotate"></a>`backuprotate`
|
244
|
920
|
|
921 Data type: `Any`
|
|
922
|
|
923 Backup rotation interval in 24 hour periods.
|
|
924
|
389
|
925 Default value: `30`
|
|
926
|
443
|
927 ##### <a name="-mysql--server--backup--ignore_events"></a>`ignore_events`
|
244
|
928
|
|
929 Data type: `Any`
|
|
930
|
|
931 Ignore the mysql.event table.
|
|
932
|
443
|
933 Default value: `true`
|
|
934
|
|
935 ##### <a name="-mysql--server--backup--delete_before_dump"></a>`delete_before_dump`
|
244
|
936
|
|
937 Data type: `Any`
|
|
938
|
|
939 Whether to delete old .sql files before backing up. Setting to true deletes old files before backing up, while setting to false deletes them after backup.
|
|
940
|
443
|
941 Default value: `false`
|
|
942
|
|
943 ##### <a name="-mysql--server--backup--backupdatabases"></a>`backupdatabases`
|
244
|
944
|
|
945 Data type: `Any`
|
|
946
|
|
947 Databases to backup (required if using xtrabackup provider). By default `[]` will back up all databases.
|
|
948
|
389
|
949 Default value: `[]`
|
|
950
|
443
|
951 ##### <a name="-mysql--server--backup--file_per_database"></a>`file_per_database`
|
244
|
952
|
|
953 Data type: `Any`
|
|
954
|
|
955 Use file per database mode creating one file per database backup.
|
|
956
|
443
|
957 Default value: `false`
|
|
958
|
|
959 ##### <a name="-mysql--server--backup--include_routines"></a>`include_routines`
|
244
|
960
|
|
961 Data type: `Any`
|
|
962
|
|
963 Dump stored routines (procedures and functions) from dumped databases when doing a `file_per_database` backup.
|
|
964
|
443
|
965 Default value: `false`
|
|
966
|
|
967 ##### <a name="-mysql--server--backup--include_triggers"></a>`include_triggers`
|
244
|
968
|
|
969 Data type: `Any`
|
|
970
|
|
971 Dump triggers for each dumped table when doing a `file_per_database` backup.
|
|
972
|
443
|
973 Default value: `false`
|
|
974
|
|
975 ##### <a name="-mysql--server--backup--incremental_backups"></a>`incremental_backups`
|
244
|
976
|
|
977 Data type: `Any`
|
|
978
|
389
|
979 A flag to activate/deactivate incremental backups. Currently only supported by the xtrabackup provider.
|
|
980
|
443
|
981 Default value: `true`
|
|
982
|
|
983 ##### <a name="-mysql--server--backup--ensure"></a>`ensure`
|
389
|
984
|
|
985 Data type: `Any`
|
|
986
|
|
987
|
|
988
|
|
989 Default value: `'present'`
|
|
990
|
443
|
991 ##### <a name="-mysql--server--backup--time"></a>`time`
|
244
|
992
|
|
993 Data type: `Any`
|
|
994
|
|
995 An array of two elements to set the backup time. Allows ['23', '5'] (i.e., 23:05) or ['3', '45'] (i.e., 03:45) for HH:MM times.
|
|
996
|
389
|
997 Default value: `['23', '5']`
|
|
998
|
443
|
999 ##### <a name="-mysql--server--backup--prescript"></a>`prescript`
|
244
|
1000
|
|
1001 Data type: `Any`
|
|
1002
|
|
1003 A script that is executed before the backup begins.
|
|
1004
|
443
|
1005 Default value: `false`
|
|
1006
|
|
1007 ##### <a name="-mysql--server--backup--postscript"></a>`postscript`
|
244
|
1008
|
|
1009 Data type: `Any`
|
|
1010
|
|
1011 A script that is executed when the backup is finished. This could be used to sync the backup to a central store. This script can be either a single line that is directly executed or a number of lines supplied as an array. It could also be one or more externally managed (executable) files.
|
|
1012
|
443
|
1013 Default value: `false`
|
|
1014
|
|
1015 ##### <a name="-mysql--server--backup--execpath"></a>`execpath`
|
244
|
1016
|
|
1017 Data type: `Any`
|
|
1018
|
|
1019 Allows you to set a custom PATH should your MySQL installation be non-standard places. Defaults to `/usr/bin:/usr/sbin:/bin:/sbin`.
|
|
1020
|
389
|
1021 Default value: `'/usr/bin:/usr/sbin:/bin:/sbin'`
|
|
1022
|
443
|
1023 ##### <a name="-mysql--server--backup--provider"></a>`provider`
|
244
|
1024
|
|
1025 Data type: `Any`
|
|
1026
|
443
|
1027 Sets the server backup implementation. Valid values are: xtrabackup, mysqldump, mysqlbackup
|
244
|
1028
|
389
|
1029 Default value: `'mysqldump'`
|
|
1030
|
443
|
1031 ##### <a name="-mysql--server--backup--maxallowedpacket"></a>`maxallowedpacket`
|
244
|
1032
|
|
1033 Data type: `Any`
|
|
1034
|
|
1035 Defines the maximum SQL statement size for the backup dump script. The default value is 1MB, as this is the default MySQL Server value.
|
|
1036
|
389
|
1037 Default value: `'1M'`
|
|
1038
|
443
|
1039 ##### <a name="-mysql--server--backup--optional_args"></a>`optional_args`
|
244
|
1040
|
|
1041 Data type: `Any`
|
|
1042
|
|
1043 Specifies an array of optional arguments which should be passed through to the backup tool. (Supported by the xtrabackup and mysqldump providers.)
|
|
1044
|
389
|
1045 Default value: `[]`
|
|
1046
|
443
|
1047 ##### <a name="-mysql--server--backup--install_cron"></a>`install_cron`
|
244
|
1048
|
|
1049 Data type: `Any`
|
|
1050
|
389
|
1051 Manage installation of cron package
|
|
1052
|
443
|
1053 Default value: `true`
|
|
1054
|
|
1055 ##### <a name="-mysql--server--backup--compression_command"></a>`compression_command`
|
244
|
1056
|
|
1057 Data type: `Any`
|
|
1058
|
389
|
1059 Configure the command used to compress the backup (when using the mysqldump provider). Make sure the command exists
|
|
1060 on the target system. Packages for it are NOT automatically installed.
|
|
1061
|
443
|
1062 Default value: `undef`
|
|
1063
|
|
1064 ##### <a name="-mysql--server--backup--compression_extension"></a>`compression_extension`
|
244
|
1065
|
|
1066 Data type: `Any`
|
|
1067
|
389
|
1068 Configure the file extension for the compressed backup (when using the mysqldump provider)
|
|
1069
|
443
|
1070 Default value: `undef`
|
|
1071
|
|
1072 ##### <a name="-mysql--server--backup--backupmethod_package"></a>`backupmethod_package`
|
|
1073
|
|
1074 Data type: `Any`
|
|
1075
|
|
1076 The package which provides the binary specified by the backupmethod parameter.
|
|
1077
|
|
1078 Default value: `$mysql::params::xtrabackup_package_name`
|
|
1079
|
|
1080 ##### <a name="-mysql--server--backup--excludedatabases"></a>`excludedatabases`
|
|
1081
|
|
1082 Data type: `Array[String]`
|
|
1083
|
|
1084 Give a list of excluded databases when using file_per_database, e.g.: [ 'information_schema', 'performance_schema' ]
|
|
1085
|
|
1086 Default value: `[]`
|
244
|
1087
|
|
1088 ## Defined types
|
|
1089
|
443
|
1090 ### <a name="mysql--db"></a>`mysql::db`
|
244
|
1091
|
|
1092 Create and configure a MySQL database.
|
|
1093
|
|
1094 #### Examples
|
|
1095
|
|
1096 ##### Create a database
|
|
1097
|
|
1098 ```puppet
|
|
1099 mysql::db { 'mydb':
|
|
1100 user => 'myuser',
|
|
1101 password => 'mypass',
|
|
1102 host => 'localhost',
|
|
1103 grant => ['SELECT', 'UPDATE'],
|
|
1104 }
|
|
1105 ```
|
|
1106
|
|
1107 #### Parameters
|
|
1108
|
389
|
1109 The following parameters are available in the `mysql::db` defined type:
|
|
1110
|
443
|
1111 * [`name`](#-mysql--db--name)
|
|
1112 * [`user`](#-mysql--db--user)
|
|
1113 * [`password`](#-mysql--db--password)
|
|
1114 * [`tls_options`](#-mysql--db--tls_options)
|
|
1115 * [`dbname`](#-mysql--db--dbname)
|
|
1116 * [`charset`](#-mysql--db--charset)
|
|
1117 * [`collate`](#-mysql--db--collate)
|
|
1118 * [`host`](#-mysql--db--host)
|
|
1119 * [`grant`](#-mysql--db--grant)
|
|
1120 * [`grant_options`](#-mysql--db--grant_options)
|
|
1121 * [`sql`](#-mysql--db--sql)
|
|
1122 * [`enforce_sql`](#-mysql--db--enforce_sql)
|
|
1123 * [`ensure`](#-mysql--db--ensure)
|
|
1124 * [`import_timeout`](#-mysql--db--import_timeout)
|
|
1125 * [`import_cat_cmd`](#-mysql--db--import_cat_cmd)
|
|
1126 * [`mysql_exec_path`](#-mysql--db--mysql_exec_path)
|
|
1127
|
|
1128 ##### <a name="-mysql--db--name"></a>`name`
|
|
1129
|
|
1130 The name of the database to create. Database names must:
|
|
1131 * be longer than 64 characters.
|
|
1132 * not contain / \ or . characters.
|
|
1133 * not contain characters that are not permitted in file names.
|
|
1134 * not end with space characters.
|
|
1135
|
|
1136 ##### <a name="-mysql--db--user"></a>`user`
|
244
|
1137
|
|
1138 Data type: `Any`
|
|
1139
|
|
1140 The user for the database you're creating.
|
|
1141
|
443
|
1142 ##### <a name="-mysql--db--password"></a>`password`
|
389
|
1143
|
|
1144 Data type: `Variant[String, Sensitive[String]]`
|
244
|
1145
|
|
1146 The password for $user for the database you're creating.
|
|
1147
|
443
|
1148 ##### <a name="-mysql--db--tls_options"></a>`tls_options`
|
244
|
1149
|
|
1150 Data type: `Any`
|
|
1151
|
|
1152 The tls_options for $user for the database you're creating.
|
|
1153
|
443
|
1154 Default value: `undef`
|
|
1155
|
|
1156 ##### <a name="-mysql--db--dbname"></a>`dbname`
|
|
1157
|
|
1158 Data type: `String`
|
244
|
1159
|
|
1160 The name of the database to create.
|
|
1161
|
389
|
1162 Default value: `$name`
|
|
1163
|
443
|
1164 ##### <a name="-mysql--db--charset"></a>`charset`
|
244
|
1165
|
|
1166 Data type: `Any`
|
|
1167
|
443
|
1168 The character set for the database. Must have the same value as collate to avoid corrective changes. See https://dev.mysql.com/doc/refman/8.0/en/charset-mysql.html for charset and collation pairs.
|
244
|
1169
|
389
|
1170 Default value: `'utf8'`
|
|
1171
|
443
|
1172 ##### <a name="-mysql--db--collate"></a>`collate`
|
244
|
1173
|
|
1174 Data type: `Any`
|
|
1175
|
443
|
1176 The collation for the database. Must have the same value as charset to avoid corrective changes. See https://dev.mysql.com/doc/refman/8.0/en/charset-mysql.html for charset and collation pairs.
|
244
|
1177
|
389
|
1178 Default value: `'utf8_general_ci'`
|
|
1179
|
443
|
1180 ##### <a name="-mysql--db--host"></a>`host`
|
244
|
1181
|
|
1182 Data type: `Any`
|
|
1183
|
|
1184 The host to use as part of user@host for grants.
|
|
1185
|
389
|
1186 Default value: `'localhost'`
|
|
1187
|
443
|
1188 ##### <a name="-mysql--db--grant"></a>`grant`
|
244
|
1189
|
|
1190 Data type: `Any`
|
|
1191
|
|
1192 The privileges to be granted for user@host on the database.
|
|
1193
|
389
|
1194 Default value: `'ALL'`
|
|
1195
|
443
|
1196 ##### <a name="-mysql--db--grant_options"></a>`grant_options`
|
244
|
1197
|
|
1198 Data type: `Any`
|
|
1199
|
|
1200 The grant_options for the grant for user@host on the database.
|
|
1201
|
443
|
1202 Default value: `undef`
|
|
1203
|
|
1204 ##### <a name="-mysql--db--sql"></a>`sql`
|
|
1205
|
|
1206 Data type: `Optional[Array]`
|
|
1207
|
|
1208 The path to the sqlfile you want to execute. This can be an array containing one or more file paths.
|
|
1209
|
|
1210 Default value: `undef`
|
|
1211
|
|
1212 ##### <a name="-mysql--db--enforce_sql"></a>`enforce_sql`
|
244
|
1213
|
|
1214 Data type: `Any`
|
|
1215
|
|
1216 Specifies whether executing the sqlfiles should happen on every run. If set to false, sqlfiles only run once.
|
|
1217
|
443
|
1218 Default value: `false`
|
|
1219
|
|
1220 ##### <a name="-mysql--db--ensure"></a>`ensure`
|
244
|
1221
|
|
1222 Data type: `Enum['absent', 'present']`
|
|
1223
|
|
1224 Specifies whether to create the database. Valid values are 'present', 'absent'. Defaults to 'present'.
|
|
1225
|
389
|
1226 Default value: `'present'`
|
|
1227
|
443
|
1228 ##### <a name="-mysql--db--import_timeout"></a>`import_timeout`
|
244
|
1229
|
|
1230 Data type: `Any`
|
|
1231
|
|
1232 Timeout, in seconds, for loading the sqlfiles. Defaults to 300.
|
|
1233
|
389
|
1234 Default value: `300`
|
|
1235
|
443
|
1236 ##### <a name="-mysql--db--import_cat_cmd"></a>`import_cat_cmd`
|
|
1237
|
|
1238 Data type: `Enum['cat', 'zcat', 'bzcat']`
|
244
|
1239
|
|
1240 Command to read the sqlfile for importing the database. Useful for compressed sqlfiles. For example, you can use 'zcat' for .gz files.
|
|
1241
|
389
|
1242 Default value: `'cat'`
|
|
1243
|
443
|
1244 ##### <a name="-mysql--db--mysql_exec_path"></a>`mysql_exec_path`
|
244
|
1245
|
|
1246 Data type: `Any`
|
|
1247
|
|
1248
|
|
1249
|
443
|
1250 Default value: `undef`
|
244
|
1251
|
|
1252 ## Resource types
|
|
1253
|
389
|
1254 ### <a name="mysql_grant"></a>`mysql_grant`
|
244
|
1255
|
|
1256 @summary
|
|
1257 Manage a MySQL user's rights.
|
|
1258
|
|
1259 #### Properties
|
|
1260
|
|
1261 The following properties are available in the `mysql_grant` type.
|
|
1262
|
|
1263 ##### `ensure`
|
|
1264
|
389
|
1265 Valid values: `present`, `absent`
|
244
|
1266
|
|
1267 The basic property that the resource should be in.
|
|
1268
|
389
|
1269 Default value: `present`
|
|
1270
|
|
1271 ##### `options`
|
|
1272
|
|
1273 Options to grant.
|
244
|
1274
|
|
1275 ##### `privileges`
|
|
1276
|
|
1277 Privileges for user
|
|
1278
|
|
1279 ##### `table`
|
|
1280
|
389
|
1281 Valid values: `%r{.*\..*}`, `%r{^[0-9a-zA-Z$_]*@[\w%\.:\-/]*$}`
|
244
|
1282
|
|
1283 Table to apply privileges to.
|
|
1284
|
|
1285 ##### `user`
|
|
1286
|
|
1287 User to operate on.
|
|
1288
|
|
1289 #### Parameters
|
|
1290
|
|
1291 The following parameters are available in the `mysql_grant` type.
|
|
1292
|
443
|
1293 * [`name`](#-mysql_grant--name)
|
|
1294 * [`provider`](#-mysql_grant--provider)
|
|
1295
|
|
1296 ##### <a name="-mysql_grant--name"></a>`name`
|
244
|
1297
|
|
1298 namevar
|
|
1299
|
|
1300 Name to describe the grant.
|
|
1301
|
443
|
1302 ##### <a name="-mysql_grant--provider"></a>`provider`
|
389
|
1303
|
|
1304 The specific backend to use for this `mysql_grant` resource. You will seldom need to specify this --- Puppet will
|
|
1305 usually discover the appropriate provider for your platform.
|
|
1306
|
|
1307 ### <a name="mysql_login_path"></a>`mysql_login_path`
|
|
1308
|
|
1309 This type provides Puppet with the capabilities to store authentication credentials in an obfuscated login path file
|
|
1310 named .mylogin.cnf created with the mysql_config_editor utility. Supports only MySQL Community Edition > v5.6.6.
|
|
1311
|
|
1312 * **See also**
|
|
1313 * https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html
|
|
1314
|
|
1315 #### Examples
|
|
1316
|
|
1317 #####
|
|
1318
|
|
1319 ```puppet
|
|
1320 mysql_login_path { 'local_socket':
|
|
1321 owner => 'root',
|
|
1322 host => 'localhost',
|
|
1323 user => 'root',
|
|
1324 password => Sensitive('secure'),
|
|
1325 socket => '/var/run/mysql/mysql.sock',
|
|
1326 ensure => present,
|
|
1327 }
|
|
1328
|
|
1329 mysql_login_path { 'local_tcp':
|
|
1330 owner => 'root',
|
|
1331 host => '127.0.0.1',
|
|
1332 user => 'root',
|
|
1333 password => Sensitive('more_secure'),
|
|
1334 port => 3306,
|
|
1335 ensure => present,
|
|
1336 }
|
|
1337 ```
|
|
1338
|
|
1339 #### Properties
|
|
1340
|
|
1341 The following properties are available in the `mysql_login_path` type.
|
|
1342
|
|
1343 ##### `ensure`
|
|
1344
|
|
1345 Data type: `Enum[present, absent]`
|
|
1346
|
|
1347 Whether this resource should be present or absent on the target system.
|
|
1348
|
|
1349 ##### `host`
|
|
1350
|
|
1351 Data type: `Optional[String]`
|
|
1352
|
|
1353 Host name to be entered into the login path.
|
|
1354
|
|
1355 ##### `password`
|
|
1356
|
|
1357 Data type: `Optional[Sensitive[String[1]]]`
|
|
1358
|
|
1359 Password to be entered into login path
|
|
1360
|
|
1361 ##### `port`
|
|
1362
|
|
1363 Data type: `Optional[Integer[0,65535]]`
|
|
1364
|
|
1365 Port number to be entered into login path.
|
|
1366
|
|
1367 ##### `socket`
|
|
1368
|
|
1369 Data type: `Optional[String]`
|
|
1370
|
|
1371 Socket path to be entered into login path
|
|
1372
|
|
1373 ##### `user`
|
|
1374
|
|
1375 Data type: `Optional[String]`
|
|
1376
|
|
1377 Username to be entered into the login path.
|
|
1378
|
|
1379 #### Parameters
|
|
1380
|
|
1381 The following parameters are available in the `mysql_login_path` type.
|
|
1382
|
443
|
1383 * [`name`](#-mysql_login_path--name)
|
|
1384 * [`owner`](#-mysql_login_path--owner)
|
|
1385
|
|
1386 ##### <a name="-mysql_login_path--name"></a>`name`
|
389
|
1387
|
|
1388 namevar
|
|
1389
|
|
1390 Data type: `String`
|
|
1391
|
|
1392 Name of the login path you want to manage.
|
|
1393
|
443
|
1394 ##### <a name="-mysql_login_path--owner"></a>`owner`
|
389
|
1395
|
|
1396 namevar
|
|
1397
|
|
1398 Data type: `String`
|
|
1399
|
|
1400 The user to whom the logon path should belong.
|
|
1401
|
|
1402 Default value: `root`
|
|
1403
|
|
1404 ### <a name="mysql_plugin"></a>`mysql_plugin`
|
244
|
1405
|
|
1406 Manage MySQL plugins.
|
|
1407
|
|
1408 #### Examples
|
|
1409
|
|
1410 #####
|
|
1411
|
|
1412 ```puppet
|
|
1413 mysql_plugin { 'some_plugin':
|
|
1414 soname => 'some_pluginlib.so',
|
|
1415 }
|
|
1416 ```
|
|
1417
|
|
1418 #### Properties
|
|
1419
|
|
1420 The following properties are available in the `mysql_plugin` type.
|
|
1421
|
|
1422 ##### `ensure`
|
|
1423
|
389
|
1424 Valid values: `present`, `absent`
|
244
|
1425
|
|
1426 The basic property that the resource should be in.
|
|
1427
|
389
|
1428 Default value: `present`
|
244
|
1429
|
|
1430 ##### `soname`
|
|
1431
|
389
|
1432 Valid values: `%r{^\w+\.\w+$}`
|
244
|
1433
|
|
1434 The name of the library
|
|
1435
|
|
1436 #### Parameters
|
|
1437
|
|
1438 The following parameters are available in the `mysql_plugin` type.
|
|
1439
|
443
|
1440 * [`name`](#-mysql_plugin--name)
|
|
1441 * [`provider`](#-mysql_plugin--provider)
|
|
1442
|
|
1443 ##### <a name="-mysql_plugin--name"></a>`name`
|
244
|
1444
|
|
1445 namevar
|
|
1446
|
|
1447 The name of the MySQL plugin to manage.
|
|
1448
|
443
|
1449 ##### <a name="-mysql_plugin--provider"></a>`provider`
|
389
|
1450
|
|
1451 The specific backend to use for this `mysql_plugin` resource. You will seldom need to specify this --- Puppet will
|
|
1452 usually discover the appropriate provider for your platform.
|
|
1453
|
|
1454 ### <a name="mysql_user"></a>`mysql_user`
|
244
|
1455
|
|
1456 @summary
|
|
1457 Manage a MySQL user. This includes management of users password as well as privileges.
|
|
1458
|
|
1459 #### Properties
|
|
1460
|
|
1461 The following properties are available in the `mysql_user` type.
|
|
1462
|
|
1463 ##### `ensure`
|
|
1464
|
389
|
1465 Valid values: `present`, `absent`
|
244
|
1466
|
|
1467 The basic property that the resource should be in.
|
|
1468
|
389
|
1469 Default value: `present`
|
244
|
1470
|
|
1471 ##### `max_connections_per_hour`
|
|
1472
|
389
|
1473 Valid values: `%r{\d+}`
|
244
|
1474
|
|
1475 Max connections per hour for the user. 0 means no (or global) limit.
|
|
1476
|
|
1477 ##### `max_queries_per_hour`
|
|
1478
|
389
|
1479 Valid values: `%r{\d+}`
|
244
|
1480
|
|
1481 Max queries per hour for the user. 0 means no (or global) limit.
|
|
1482
|
|
1483 ##### `max_updates_per_hour`
|
|
1484
|
389
|
1485 Valid values: `%r{\d+}`
|
244
|
1486
|
|
1487 Max updates per hour for the user. 0 means no (or global) limit.
|
|
1488
|
389
|
1489 ##### `max_user_connections`
|
|
1490
|
|
1491 Valid values: `%r{\d+}`
|
|
1492
|
|
1493 Max concurrent connections for the user. 0 means no (or global) limit.
|
|
1494
|
|
1495 ##### `password_hash`
|
|
1496
|
|
1497 Valid values: `%r{\w*}`
|
|
1498
|
|
1499 The password hash of the user. Use mysql::password() for creating such a hash.
|
|
1500
|
|
1501 ##### `plugin`
|
|
1502
|
|
1503 Valid values: `%r{\w+}`
|
|
1504
|
|
1505 The authentication plugin of the user.
|
|
1506
|
244
|
1507 ##### `tls_options`
|
|
1508
|
|
1509 Options to that set the TLS-related REQUIRE attributes for the user.
|
|
1510
|
|
1511 #### Parameters
|
|
1512
|
|
1513 The following parameters are available in the `mysql_user` type.
|
|
1514
|
443
|
1515 * [`name`](#-mysql_user--name)
|
|
1516 * [`provider`](#-mysql_user--provider)
|
|
1517
|
|
1518 ##### <a name="-mysql_user--name"></a>`name`
|
244
|
1519
|
|
1520 namevar
|
|
1521
|
|
1522 The name of the user. This uses the 'username@hostname' or username@hostname.
|
|
1523
|
443
|
1524 ##### <a name="-mysql_user--provider"></a>`provider`
|
389
|
1525
|
|
1526 The specific backend to use for this `mysql_user` resource. You will seldom need to specify this --- Puppet will usually
|
|
1527 discover the appropriate provider for your platform.
|
|
1528
|
244
|
1529 ## Functions
|
|
1530
|
443
|
1531 ### <a name="mysql--normalise_and_deepmerge"></a>`mysql::normalise_and_deepmerge`
|
244
|
1532
|
|
1533 Type: Ruby 4.x API
|
|
1534
|
|
1535 - When there is a duplicate key that is a hash, they are recursively merged.
|
|
1536 - When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
|
|
1537 - When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win.
|
|
1538
|
|
1539 #### Examples
|
|
1540
|
|
1541 #####
|
|
1542
|
|
1543 ```puppet
|
|
1544 $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
|
|
1545 $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
|
|
1546 $merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2)
|
|
1547 # The resulting hash is equivalent to:
|
|
1548 # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
|
|
1549 ```
|
|
1550
|
|
1551 #### `mysql::normalise_and_deepmerge(Any *$args)`
|
|
1552
|
|
1553 - When there is a duplicate key that is a hash, they are recursively merged.
|
|
1554 - When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
|
|
1555 - When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win.
|
|
1556
|
389
|
1557 Returns: `Any` hash
|
|
1558 The given hash normalised
|
244
|
1559
|
|
1560 ##### Examples
|
|
1561
|
|
1562 ######
|
|
1563
|
|
1564 ```puppet
|
|
1565 $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
|
|
1566 $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
|
|
1567 $merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2)
|
|
1568 # The resulting hash is equivalent to:
|
|
1569 # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
|
|
1570 ```
|
|
1571
|
|
1572 ##### `*args`
|
|
1573
|
|
1574 Data type: `Any`
|
|
1575
|
389
|
1576 Hash to be normalised
|
|
1577
|
443
|
1578 ### <a name="mysql--password"></a>`mysql::password`
|
244
|
1579
|
|
1580 Type: Ruby 4.x API
|
|
1581
|
|
1582 Hash a string as mysql's "PASSWORD()" function would do it
|
|
1583
|
389
|
1584 #### `mysql::password(Variant[String, Sensitive[String]] $password, Optional[Boolean] $sensitive)`
|
|
1585
|
|
1586 Hash a string as mysql's "PASSWORD()" function would do it
|
|
1587
|
|
1588 Returns: `Variant[String, Sensitive[String]]` hash
|
244
|
1589 The mysql password hash from the clear text password.
|
|
1590
|
|
1591 ##### `password`
|
|
1592
|
389
|
1593 Data type: `Variant[String, Sensitive[String]]`
|
244
|
1594
|
|
1595 Plain text password.
|
|
1596
|
389
|
1597 ##### `sensitive`
|
|
1598
|
|
1599 Data type: `Optional[Boolean]`
|
|
1600
|
443
|
1601 If the mysql password hash should be of datatype Sensitive[String]
|
|
1602
|
|
1603 ### <a name="mysql--strip_hash"></a>`mysql::strip_hash`
|
244
|
1604
|
|
1605 Type: Ruby 4.x API
|
|
1606
|
|
1607 When given a hash this function strips out all blank entries.
|
|
1608
|
|
1609 #### `mysql::strip_hash(Hash $hash)`
|
|
1610
|
|
1611 The mysql::strip_hash function.
|
|
1612
|
|
1613 Returns: `Hash` hash
|
|
1614 The given hash with all blank entries removed
|
|
1615
|
|
1616 ##### `hash`
|
|
1617
|
|
1618 Data type: `Hash`
|
|
1619
|
|
1620 Hash to be stripped
|
|
1621
|
389
|
1622 ### <a name="mysql_password"></a>`mysql_password`
|
|
1623
|
|
1624 Type: Ruby 4.x API
|
|
1625
|
|
1626 DEPRECATED. Use the namespaced function [`mysql::password`](#mysqlpassword) instead.
|
|
1627
|
|
1628 #### `mysql_password(Variant[String, Sensitive[String]] $password, Optional[Boolean] $sensitive)`
|
244
|
1629
|
|
1630 The mysql_password function.
|
|
1631
|
389
|
1632 Returns: `Variant[String, Sensitive[String]]` The mysql password hash from the 4.x function mysql::password.
|
244
|
1633
|
|
1634 ##### `password`
|
|
1635
|
389
|
1636 Data type: `Variant[String, Sensitive[String]]`
|
244
|
1637
|
|
1638 Plain text password.
|
|
1639
|
389
|
1640 ##### `sensitive`
|
|
1641
|
|
1642 Data type: `Optional[Boolean]`
|
|
1643
|
|
1644
|
|
1645
|
|
1646 ## Data types
|
|
1647
|
443
|
1648 ### <a name="Mysql--Options"></a>`Mysql::Options`
|
389
|
1649
|
|
1650 Use this if you don’t want your options merged with the default options.
|
|
1651
|
443
|
1652 Alias of `Hash[String, Hash]`
|
389
|
1653
|
244
|
1654 ## Tasks
|
|
1655
|
389
|
1656 ### <a name="export"></a>`export`
|
244
|
1657
|
|
1658 Allows you to backup your database to local file.
|
|
1659
|
|
1660 **Supports noop?** false
|
|
1661
|
|
1662 #### Parameters
|
|
1663
|
|
1664 ##### `database`
|
|
1665
|
|
1666 Data type: `Optional[String[1]]`
|
|
1667
|
|
1668 Database to connect to
|
|
1669
|
|
1670 ##### `user`
|
|
1671
|
|
1672 Data type: `Optional[String[1]]`
|
|
1673
|
|
1674 The user
|
|
1675
|
|
1676 ##### `password`
|
|
1677
|
|
1678 Data type: `Optional[String[1]]`
|
|
1679
|
|
1680 The password
|
|
1681
|
|
1682 ##### `file`
|
|
1683
|
|
1684 Data type: `String[1]`
|
|
1685
|
|
1686 Path to file you want backup to
|
|
1687
|
389
|
1688 ### <a name="sql"></a>`sql`
|
244
|
1689
|
|
1690 Allows you to execute arbitary SQL
|
|
1691
|
|
1692 **Supports noop?** false
|
|
1693
|
|
1694 #### Parameters
|
|
1695
|
|
1696 ##### `database`
|
|
1697
|
|
1698 Data type: `Optional[String[1]]`
|
|
1699
|
|
1700 Database to connect to
|
|
1701
|
|
1702 ##### `user`
|
|
1703
|
|
1704 Data type: `Optional[String[1]]`
|
|
1705
|
|
1706 The user
|
|
1707
|
|
1708 ##### `password`
|
|
1709
|
|
1710 Data type: `Optional[String[1]]`
|
|
1711
|
|
1712 The password
|
|
1713
|
|
1714 ##### `sql`
|
|
1715
|
|
1716 Data type: `String[1]`
|
|
1717
|
|
1718 The SQL you want to execute
|
|
1719
|