node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

[Question] Mysql 8 auth support for mysql2 server

Open haganbt opened this issue 4 years ago • 4 comments

Is caching_sha2_password supported when using mysql2 as a server/proxy?

I cannot see any references in the examples.

Appreciate any guidance.

haganbt avatar Nov 12 '20 19:11 haganbt

sorry for delays @haganbt I'll get back with more detailed answer soon

caching_sha2_password is not supported out of the box yet. It's still possible to have it I believe but you'd need to handle all auth packets sequence manually in the server code ( which is a bit more complicated than one roundtrip salt -> auth(password, salt)` mysql_native_password flow )

sidorares avatar Nov 19 '20 00:11 sidorares

Any further clarification here @sidorares would be very much appreciated.

haganbt avatar Nov 30 '20 17:11 haganbt

Any updates on this? Is this supported out of the box now? @sidorares

pureLifeWater101 avatar Jul 12 '23 20:07 pureLifeWater101

Still not possible but I plan to look at that soon. Probably needs "server api at command (state machine managing sequence of packets ) level, not just individual packets" - some initial work started 2 years ago in #1405

sidorares avatar Jul 17 '23 01:07 sidorares