This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Quick work around for creating MySQL 8 users/roles/databases #11373
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello: https://trello.com/c/HjK4AbUS/49-configure-puppet-for-new-db-admin-mysql-instances
The mysql puppet version we use does not have the correct syntax for
creating users for MySQL 8 1 (well not in a version that is compatible with
Puppet 3.x, which is understandable)
This runs the commands to do these tasks without utilising the puppet
module and instead running the queries directly.
This worked (after a bit of trial and error) on a Whitehall DB Admin
box:
There's a few things about this though which don't make it suitable as a
merge contender currently:
error when ran on an existing box, it'll need some way to alternate
between approaches
elegantly, I couldn't remember how things worked and guessed a bit
with require - I think some commands should depend on the MySQL
package but that didn't work for me. It might be better to just have
one script of MySQL that's executed rather than a bunch of commands
MySQL module currently does - I don't think it'll be
This does rely on the mysql_password function that I believe the puppet
module exposes.
The alternative to do something like this is creating the database and
users on the machines manually - this isn't the most arduous process as
they are created very infrequently