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
+31
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,36 @@ mysql::db { 'mydb':
184
184
185
185
If required, the password can also be an empty string to allow connections without an password.
186
186
187
+
### Create login paths
188
+
189
+
This feature works only for the MySQL Community Edition >= 5.6.6.
190
+
191
+
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.
192
+
193
+
More information about MySQL login paths: https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html.
194
+
195
+
Some example for login paths:
196
+
```puppet
197
+
mysql_login_path { 'client':
198
+
owner => root,
199
+
host => 'localhost',
200
+
user => 'root',
201
+
password => Sensitive('secure'),
202
+
socket => '/var/run/mysqld/mysqld.sock',
203
+
ensure => present,
204
+
}
205
+
206
+
mysql_login_path { 'remote_db':
207
+
owner => root,
208
+
host => '10.0.0.1',
209
+
user => 'network',
210
+
password => Sensitive('secure'),
211
+
port => 3306,
212
+
ensure => present,
213
+
}
214
+
```
215
+
See examples/mysql_login_path.pp for further examples.
216
+
187
217
### Install Percona server on CentOS
188
218
189
219
This example shows how to do a minimal installation of a Percona server on a
@@ -613,3 +643,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
@@ -66,6 +68,14 @@ then returns the resulting hash.
66
68
67
69
*[`Mysql::Options`](#mysqloptions):
68
70
71
+
**Data types**
72
+
73
+
*[`Mysql::Options`](#mysqloptions):
74
+
75
+
**Data types**
76
+
77
+
*[`Mysql::Options`](#mysqloptions):
78
+
69
79
**Tasks**
70
80
71
81
*[`export`](#export): Allows you to backup your database to local file.
@@ -1157,6 +1167,100 @@ namevar
1157
1167
1158
1168
Name to describe the grant.
1159
1169
1170
+
### mysql_login_path
1171
+
1172
+
This type provides Puppet with the capabilities to store authentication credentials in an obfuscated login path file
1173
+
named .mylogin.cnf created with the mysql_config_editor utility. Supports only MySQL Community Edition > v5.6.6.
0 commit comments