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
+31Lines changed: 31 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -183,6 +183,36 @@ mysql::db { 'mydb':
183
183
184
184
If required, the password can also be an empty string to allow connections without an password.
185
185
186
+
### Create login paths
187
+
188
+
This feature works only for the MySQL Community Edition >= 5.6.6.
189
+
190
+
A login path is a set of options (host, user, password, port and socket) that specify which MySQL server to connect to and which account to authenticate as. The authentication credentials and the other options are stored in an encrypted login file named .mylogin.cnf typically under the users home directory.
191
+
192
+
More information about MySQL login paths: https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html.
193
+
194
+
Some example for login paths:
195
+
```puppet
196
+
mysql_login_path { 'client':
197
+
owner => root,
198
+
host => 'localhost',
199
+
user => 'root',
200
+
password => Sensitive('secure'),
201
+
socket => '/var/run/mysqld/mysqld.sock',
202
+
ensure => present,
203
+
}
204
+
205
+
mysql_login_path { 'remote_db':
206
+
owner => root,
207
+
host => '10.0.0.1',
208
+
user => 'network',
209
+
password => Sensitive('secure'),
210
+
port => 3306,
211
+
ensure => present,
212
+
}
213
+
```
214
+
See examples/mysql_login_path.pp for further examples.
215
+
186
216
### Install Percona server on CentOS
187
217
188
218
This example shows how to do a minimal installation of a Percona server on a
@@ -549,3 +579,4 @@ This module is based on work by David Schmitt. The following contributors have c
*[`mysql::normalise_and_deepmerge`](#mysqlnormalise_and_deepmerge): Recursively merges two or more hashes together, normalises keys with differing use of dashesh and underscores,
60
62
then returns the resulting hash.
61
63
*[`mysql::password`](#mysqlpassword): Hash a string as mysql's "PASSWORD()" function would do it
62
64
*[`mysql::strip_hash`](#mysqlstrip_hash): When given a hash this function strips out all blank entries.
63
65
*[`mysql_password`](#mysql_password): Hash a string as mysql's "PASSWORD()" function would do it
64
66
67
+
**Data types**
68
+
69
+
*[`Mysql::Options`](#mysqloptions):
70
+
65
71
**Tasks**
66
72
67
73
*[`export`](#export): Allows you to backup your database to local file.
@@ -411,6 +417,14 @@ The location, as a path, of the MySQL configuration file.
411
417
412
418
Default value: $mysql::params::config_file
413
419
420
+
##### `config_file_mode`
421
+
422
+
Data type: `Any`
423
+
424
+
The MySQL configuration file's permissions mode.
425
+
426
+
Default value: $mysql::params::config_file_mode
427
+
414
428
##### `includedir`
415
429
416
430
Data type: `Any`
@@ -443,6 +457,14 @@ Whether the MySQL configuration file should be managed. Valid values are `true`,
443
457
444
458
Default value: $mysql::params::manage_config_file
445
459
460
+
##### `options`
461
+
462
+
Data type: `Mysql::Options`
463
+
464
+
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.
465
+
466
+
Default value: {}
467
+
446
468
##### `override_options`
447
469
448
470
Data type: `Any`
@@ -515,6 +537,22 @@ The name of the group of the MySQL daemon user. Can be a group name or a group I
515
537
516
538
Default value: $mysql::params::mysql_group
517
539
540
+
##### `mycnf_owner`
541
+
542
+
Data type: `Any`
543
+
544
+
Name or user-id who owns the mysql-config-file.
545
+
546
+
Default value: $mysql::params::mycnf_owner
547
+
548
+
##### `mycnf_group`
549
+
550
+
Data type: `Any`
551
+
552
+
Name or group-id which owns the mysql-config-file.
0 commit comments