You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also ran into this problem, but have more information and a solution.
MySQL 8.0 changed its default authentication plugin from mysql_native_password to caching_sha2_password. Since PHP doesnt understand caching_sha2_password, I had edited my user accounted previously to set it back to 5.7 defaults. This is what caused your error on my machine.
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password'
In order to make connections with SQLX, it seems user account must be identified by the default authentication plugin. I've updated my user back tocaching_sha2_password and the connection works.
ALTER USER 'user'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_password'
Activity
Handfish commentedon Nov 18, 2020
I also ran into this problem, but have more information and a solution.
MySQL 8.0 changed its default authentication plugin from
mysql_native_passwordtocaching_sha2_password. Since PHP doesnt understandcaching_sha2_password, I had edited my user accounted previously to set it back to 5.7 defaults. This is what caused your error on my machine.In order to make connections with SQLX, it seems user account must be identified by the default authentication plugin. I've updated my user back to
caching_sha2_passwordand the connection works.billy1624 commentedon Nov 23, 2020
Thanks!! @Handfish
leontoeides commentedon Dec 7, 2020
Amazing! Thank you @Handfish!
axzsd commentedon Dec 30, 2020
Thanks!!! @Handfish
Vrajs16 commentedon Nov 26, 2023
@abonander Can close as already fixed.