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
+14
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,8 @@ replicate-do-db = base1
85
85
replicate-do-db = base2
86
86
~~~
87
87
88
+
To implement version specific parameters you can use [mysqld-5.5] syntax which is only read by MySQL version 5.5. This allows one config for different versions of MySQL.
89
+
88
90
### Creating a database
89
91
90
92
To use `mysql::db` to create a database with a user and assign some privileges:
@@ -181,6 +183,7 @@ mysql::db { 'mydb':
181
183
#### Private classes
182
184
183
185
*`mysql::server::install`: Installs packages.
186
+
*`mysql::server::installdb`: Implements setup of mysqld data directory (e.g. /var/lib/mysql)
184
187
*`mysql::server::config`: Configures MYSQL.
185
188
*`mysql::server::service`: Manages service.
186
189
*`mysql::server::account_security`: Deletes default MySQL accounts.
@@ -805,6 +808,17 @@ The name of the MySQL plugin to manage.
805
808
806
809
The library file name.
807
810
811
+
#### `mysql_datadir`
812
+
813
+
Initializes the MySQL data directory with version specific code. Pre MySQL 5.7.6
814
+
it uses mysql_install_db. After MySQL 5.7.6 it uses mysqld --initialize-insecure.
815
+
816
+
Insecure initialization is needed, as mysqld version 5.7 introduced "secure by default" mode.
817
+
This means MySQL generates a random password and writes it to STDOUT. This means puppet
818
+
can never accesss the database server afterwards, as no credencials are available.
819
+
820
+
This type is an internal type and should not be called directly.
debug("Initializing MySQL data directory >= 5.7.6 with 'mysqld #{defaults_extra_file}#{initialize} --basedir=#{basedir} --datadir=#{datadir} --user=#{user}'")
0 commit comments