chore(mysql): change mysql auth mode to new default (caching_sha2_password
)
#3845
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.
The MySQL 9 client, which came out last week, removes the deprecated
mysql_native_password
auth mode.This means that you can't log into the server if the server uses that mode as its auth mode, which for us was the case.
Or, more specifically, the
Waiting for MySQL to come up...
check will never succeed.This PR makes it so we are using the default auth mode (
caching_sha2_password
).Notes
The actual change will only take place once the database is rebuilt, or you manually run an
ALTER USER
command.I tested it out, and existing databases will remain in full working order even if these command line args are not present - they'll just continue using
mysql_native_password
as the auth mode.Recreate DB
To re-create a DB from scratch, it's easiest to run
docker volume rm owid-grapher_mysql_data_public
and thenmake up
to have it recreated.This will delete all tables and databases that exist in this mysql instance. If that's not an option, there are also other options available.