MySQL Flask connection stopped working

Hi! I'm getting this error now when connecting to my mysql db after redeploying the standard railway image for an updated mysql version.
sqlalchemy.exc.DatabaseError: (mysql.connector.errors.DatabaseError) 1524 (HY000): Plugin 'mysql_native_password' is not loaded

(Background on this error at: https://sqlalche.me/e/20/4xp6)
sqlalchemy.exc.DatabaseError: (mysql.connector.errors.DatabaseError) 1524 (HY000): Plugin 'mysql_native_password' is not loaded

(Background on this error at: https://sqlalche.me/e/20/4xp6)
It seems my only option was to go through users to switch to a new password security setting as the previous default has removed. When exploring with the workbench I get this error However, even when running this code I still get the error above.
connection_string = f"mysql+mysqlconnector://pythonapp:{__up_key}@{__url_db}:{__port_db}/{__up_db}"
engine = create_engine(connection_string, pool_recycle=360, echo=True, connect_args={'auth_plugin': 'caching_sha2_password'})
connection_string = f"mysql+mysqlconnector://pythonapp:{__up_key}@{__url_db}:{__port_db}/{__up_db}"
engine = create_engine(connection_string, pool_recycle=360, echo=True, connect_args={'auth_plugin': 'caching_sha2_password'})
Naturally, all code is sensitivized for sharing.
No description
13 Replies
Percy
Percy6mo ago
Project ID: f3f3aa54-1f32-4a2a-9e9a-61d26191712d
ChaoticKitten
ChaoticKittenOP6mo ago
f3f3aa54-1f32-4a2a-9e9a-61d26191712d Naturally I'd love to upgrade my code's security and the provider closing down on an auth method is a pretty big sign to move into the direction they want us to - but it seems my code won't budge.
Brody
Brody6mo ago
append --mysql-native-password=ON to your database's start command
ChaoticKitten
ChaoticKittenOP6mo ago
Attempted but doesn't seem to have an effect
ChaoticKitten
ChaoticKittenOP6mo ago
No description
ChaoticKitten
ChaoticKittenOP6mo ago
Also FYI it's marked for complete deprecation so I'm not sure this is a real solution
No description
Brody
Brody6mo ago
are you sure you did that correctly? it looks like you removed every other flag
ChaoticKitten
ChaoticKittenOP6mo ago
There was no other flag previously, yes
Brody
Brody6mo ago
how long ago did you deploy this database
ChaoticKitten
ChaoticKittenOP6mo ago
Well before the redeploy roughly 5 months, but the most recent redeploy that screwed things up was 6 days ago The redeploy was meant to rebuild the image with a more recent version of mysql and nothing else. The deployments are as basic as they come with no modifications on my end.
Brody
Brody6mo ago
then I think it's best to pin your service to I think mysql 8.3.0 yeah it was deprecated in 8.4.0
ChaoticKitten
ChaoticKittenOP6mo ago
I'm thinking about migrating the tables because obviously there's some issues with that as well - since they forced some tabular changes as well that make running servers in lower versions connected to 8.4.0 tables
Brody
Brody6mo ago
whatever works best for you!
Want results from more Discord servers?
Add your server