Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(mysql): change mysql auth mode to new default (caching_sha2_password) #3845

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Aug 5, 2024

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 then make 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.

@owidbot
Copy link
Contributor

owidbot commented Aug 5, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-mysql-auth-mode

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-08-05 14:12:03 UTC
Execution time: 1.16 seconds

@marcelgerber marcelgerber requested a review from danyx23 August 5, 2024 14:27
@marcelgerber marcelgerber marked this pull request as ready for review August 5, 2024 14:28
Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@danyx23
Copy link
Contributor

danyx23 commented Aug 12, 2024

@marcelgerber I created a companion PR here, maybe you could have a look at it so we can merge it after this one: https://github.com/owid/ops/pull/220

@marcelgerber marcelgerber merged commit 9bdf96d into master Aug 12, 2024
27 checks passed
@marcelgerber marcelgerber deleted the mysql-auth-mode branch August 12, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants