balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.84k stars 1.95k forks source link

Can't connect mysql8.4 because mysql8.4 no longer supports the mysql_native_password plugin #7350

Open fengzai6 opened 1 month ago

fengzai6 commented 1 month ago

Node version: v20.14.0 Sails version (sails): 1.5.11 ORM hook version (sails-hook-orm): 4.0.3 Sockets hook version (sails-hook-sockets): 3.0.0 Organics hook version (sails-hook-organics): not use Grunt hook version (sails-hook-grunt): not use Uploads hook version (sails-hook-uploads): not use DB adapter & version (e.g. sails-mysql@5.55.5): sails-mysql@3.0.1 Skipper adapter & version (e.g. skipper-s3@5.55.5): not use


sails-mysql not support caching_sha2_password , please support it to use mysql2😣

sailsbot commented 1 month ago

@fengzai6 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.

StevenDohrman commented 2 weeks ago

I ran into this same issue running any mysql version that no longer supports mysql_native_password. If you use an older version of mysql you can get it working I do not think this is a great solution though. I think the best solution would be to update the adapter to support newer versions so you can utilize caching_sha2_password. I believe mysql versions 9.0+ have completely removed the option to use mysql_native_password and in the 8.4 update it was deprecated.

fengzai6 commented 2 weeks ago

I ran into this same issue running any mysql version that no longer supports mysql_native_password. If you use an older version of mysql you can get it working I do not think this is a great solution though. I think the best solution would be to update the adapter to support newer versions so you can utilize caching_sha2_password. I believe mysql versions 9.0+ have completely removed the option to use mysql_native_password and in the 8.4 update it was deprecated.

try this comment https://github.com/sailshq/machinepack-mysql/pull/20#issuecomment-2429131161