@@ -45,25 +45,20 @@ _Private Classes_
4545
4646_ Public Resource types_
4747
48+ * [ ` mysql_grant ` ] ( #mysql_grant ) : @summary Manage a MySQL user's rights.
4849* [ ` 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.
4951
5052_ Private Resource types_
5153
5254* ` mysql_database ` : Manage a MySQL database.
5355* ` mysql_datadir ` : Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
54- * ` mysql_grant ` : Manage a MySQL user's rights.
55- * ` mysql_user ` : Manage a MySQL user. This includes management of users password as well as privileges.
5656
5757** Functions**
5858
5959* [ ` mysql::password ` ] ( #mysqlpassword ) : Hash a string as mysql's "PASSWORD()" function would do it
6060* [ ` mysql::strip_hash ` ] ( #mysqlstrip_hash ) : When given a hash this function strips out all blank entries.
61- * [ ` mysql_password ` ] ( #mysql_password ) : A wrapper for the 4.x function 'mysql::password' to bridge the gap between
62- it and the 3.x function 'mysql_password'.
6361* [ ` mysql_password ` ] ( #mysql_password ) : Hash a string as mysql's "PASSWORD()" function would do it
64- * [ ` mysql_strip_hash ` ] ( #mysql_strip_hash ) : A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
65- it and the 3.x function 'mysql_strip_hash'.
66- * [ ` mysql_strip_hash ` ] ( #mysql_strip_hash ) : TEMPORARY FUNCTION: EXPIRES 2014-03-10 When given a hash this function strips out all blank entries.
6762
6863** Tasks**
6964
@@ -1050,6 +1045,51 @@ Default value: $mysql::params::exec_path
10501045
10511046## Resource types
10521047
1048+ ### mysql_grant
1049+
1050+ @summary
1051+ Manage a MySQL user's rights.
1052+
1053+ #### Properties
1054+
1055+ The following properties are available in the ` mysql_grant ` type.
1056+
1057+ ##### ` ensure `
1058+
1059+ Valid values: present, absent
1060+
1061+ The basic property that the resource should be in.
1062+
1063+ Default value: present
1064+
1065+ ##### ` privileges `
1066+
1067+ Privileges for user
1068+
1069+ ##### ` table `
1070+
1071+ Valid values: %r{.* \. .* }, %r{^[ 0-9a-zA-Z$_ ] * @[ \w%\. :\- /] * $}
1072+
1073+ Table to apply privileges to.
1074+
1075+ ##### ` user `
1076+
1077+ User to operate on.
1078+
1079+ ##### ` options `
1080+
1081+ Options to grant.
1082+
1083+ #### Parameters
1084+
1085+ The following parameters are available in the ` mysql_grant ` type.
1086+
1087+ ##### ` name `
1088+
1089+ namevar
1090+
1091+ Name to describe the grant.
1092+
10531093### mysql_plugin
10541094
10551095Manage MySQL plugins.
@@ -1092,95 +1132,105 @@ namevar
10921132
10931133The name of the MySQL plugin to manage.
10941134
1095- ## Functions
1135+ ### mysql_user
10961136
1097- ### mysql::password
1137+ @summary
1138+ Manage a MySQL user. This includes management of users password as well as privileges.
10981139
1099- Type: Ruby 4.x API
1140+ #### Properties
11001141
1101- Hash a string as mysql's "PASSWORD()" function would do it
1142+ The following properties are available in the ` mysql_user ` type.
11021143
1103- #### ` mysql::password(String $password) `
1144+ ##### ` ensure `
11041145
1105- The mysql::password function.
1146+ Valid values: present, absent
11061147
1107- Returns: ` String ` hash
1108- The mysql password hash from the clear text password.
1148+ The basic property that the resource should be in.
11091149
1110- ##### ` password `
1150+ Default value: present
11111151
1112- Data type: ` String `
1152+ ##### ` password_hash `
11131153
1114- Plain text password.
1154+ Valid values: %r{\w * }
11151155
1116- ### mysql::strip_hash
1156+ The password hash of the user. Use mysql_password() for creating such a hash.
11171157
1118- Type: Ruby 4.x API
1158+ ##### ` plugin `
11191159
1120- When given a hash this function strips out all blank entries.
1160+ Valid values: %r{\w+}
11211161
1122- #### ` mysql::strip_hash(Hash $hash) `
1162+ The authentication plugin of the user.
11231163
1124- The mysql::strip_hash function.
1164+ ##### ` max_user_connections `
11251165
1126- Returns: ` Hash ` hash
1127- The given hash with all blank entries removed
1166+ Valid values: %r{\d+}
11281167
1129- ##### ` hash `
1168+ Max concurrent connections for the user. 0 means no (or global) limit.
11301169
1131- Data type: ` Hash `
1170+ ##### ` max_connections_per_hour `
11321171
1133- Hash to be stripped
1172+ Valid values: %r{\d+}
11341173
1135- ### mysql_password
1174+ Max connections per hour for the user. 0 means no (or global) limit.
11361175
1137- Type: Ruby 4.x API
1176+ ##### ` max_queries_per_hour `
11381177
1139- A wrapper for the 4.x function 'mysql::password' to bridge the gap between
1140- it and the 3.x function 'mysql_password'.
1178+ Valid values: %r{\d+}
11411179
1142- #### ` mysql_password(String $password) `
1180+ Max queries per hour for the user. 0 means no (or global) limit.
11431181
1144- The mysql_password function.
1182+ ##### ` max_updates_per_hour `
11451183
1146- Returns: ` String ` The mysql password hash from the 4.x function mysql::password.
1184+ Valid values: %r{\d+}
11471185
1148- ##### ` password `
1186+ Max updates per hour for the user. 0 means no (or global) limit.
11491187
1150- Data type: ` String `
1188+ ##### ` tls_options `
11511189
1152- Plain text password .
1190+ Options to that set the TLS-related REQUIRE attributes for the user .
11531191
1154- ### mysql_password
1192+ #### Parameters
11551193
1156- Type: Ruby 3.x API
1194+ The following parameters are available in the ` mysql_user ` type.
1195+
1196+ ##### ` name `
1197+
1198+ namevar
1199+
1200+ The name of the user. This uses the 'username@hostname' or username@hostname.
1201+
1202+ ## Functions
1203+
1204+ ### mysql::password
1205+
1206+ Type: Ruby 4.x API
11571207
11581208Hash a string as mysql's "PASSWORD()" function would do it
11591209
1160- #### ` mysql_password (String $password)`
1210+ #### ` mysql::password (String $password)`
11611211
1162- The mysql_password function.
1212+ The mysql::password function.
11631213
1164- Returns: ` String ` the mysql password hash from the clear text password.
1214+ Returns: ` String ` hash
1215+ The mysql password hash from the clear text password.
11651216
11661217##### ` password `
11671218
11681219Data type: ` String `
11691220
11701221Plain text password.
11711222
1172- ### mysql_strip_hash
1223+ ### mysql::strip_hash
11731224
11741225Type: Ruby 4.x API
11751226
1176- A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
1177- it and the 3.x function 'mysql_strip_hash'.
1227+ When given a hash this function strips out all blank entries.
11781228
1179- #### ` mysql_strip_hash (Hash $hash)`
1229+ #### ` mysql::strip_hash (Hash $hash)`
11801230
1181- The mysql_strip_hash function.
1231+ The mysql::strip_hash function.
11821232
1183- Returns: ` Hash ` hash
1233+ Returns: ` Hash ` hash
11841234The given hash with all blank entries removed
11851235
11861236##### ` hash `
@@ -1189,19 +1239,23 @@ Data type: `Hash`
11891239
11901240Hash to be stripped
11911241
1192- ### mysql_strip_hash
1242+ ### mysql_password
11931243
11941244Type: Ruby 3.x API
11951245
1196- TEMPORARY FUNCTION: EXPIRES 2014-03-10
1197- When given a hash this function strips out all blank entries.
1246+ Hash a string as mysql's "PASSWORD()" function would do it
1247+
1248+ #### ` mysql_password(String $password) `
11981249
1199- #### ` mysql_strip_hash() `
1250+ The mysql_password function.
12001251
1201- TEMPORARY FUNCTION: EXPIRES 2014-03-10
1202- When given a hash this function strips out all blank entries.
1252+ Returns: ` String ` the mysql password hash from the clear text password.
1253+
1254+ ##### ` password `
12031255
1204- Returns: ` Any `
1256+ Data type: ` String `
1257+
1258+ Plain text password.
12051259
12061260## Tasks
12071261
0 commit comments