puppetlabs-mysql icon indicating copy to clipboard operation
puppetlabs-mysql copied to clipboard

Default utf8 character set and collate for databases is deprecated

Open mdetrano opened this issue 6 months ago • 2 comments

Use Case

If the charset and collate fields are not set for a mysql::db resource, the default is to use "utf8" and "utf8_general_ci". Those values were deprecated and had been treated as aliases for 'utf8mb3' and 'utf8mb3_general_ci'. More recent versions of Mariadb (perhaps Mysql too) will report utf8mb3 for the database, even if set using "utf8"..and this module will attempt to change and rerun the sql scripts when that difference is detected.

Describe the Solution You Would Like

I believe the defaults set in db.pp should be updated. Also, if this module can catch the utf8 - utf8mb3 differences and treat them as NOT different, that could smooth out some issues.

Describe Alternatives You've Considered

Explicitly setting the charset and collate values in the manifest can avoid the attempted updates.

Additional Context

Ran into this issue after an update of Mariadb to 10.11.6

mdetrano avatar Feb 16 '24 18:02 mdetrano