-
Notifications
You must be signed in to change notification settings - Fork 2k
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
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol "caching_sha2_password" #7293
Comments
@lreyessandoval Thanks for posting! We'll take a look as soon as possible. In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly. For help with questions about Sails, click here. |
@lreyessandoval The problem is because MySQL is using "caching_sha2_password" instead of the "mysql_native_password" plugin. Try this (may have to flush privileges too): ALTER USER 'user' identified with mysql_native_password BY 'changeMeRightMeow'; |
While the solution proposed will get it to work, it's not the ideal solution. Please see https://stackoverflow.com/a/56509065 for reasoning as to why. Below 3 changes resolves the issue in sailsjs-mysql:
Change package.json to require mysql2 with the latest version Updating these 3 resolved it. Can submit a PR if this is the right way to go about it. |
Node version: 16.16.0
Sails version (sails): 1.5.2
ORM hook version (sails-hook-orm): 2.1.1
Sockets hook version (sails-hook-sockets): 2.0.0
Organics hook version (sails-hook-organics):
Grunt hook version (sails-hook-grunt): 4.0.0
Uploads hook version (sails-hook-uploads):
DB adapter & version (e.g. [email protected]): 3.0.1
Skipper adapter & version (e.g. [email protected]): 0.8.7
Mysql versión: 8.0.34 community
when making a connection from an api rest project (backend) to a mysql database in version 8.0.34, it fails to establish a connection. The following error appears:
The user database is configured with "authentication" "caching_sha2_password"
The text was updated successfully, but these errors were encountered: