Conversation
…connection params incorrect
|
I know you just merged this into master 2 days ago, but might I ask when NPM will be triggered with a release for this? Thanks |
|
@RedactedProfile the plan is to bump major version, and just to be on the safe side release -alpha1 and have it for few days. I'll try to publish alpha release today, would be good to have you among early testers. I'll post a comment here when published |
|
Thanks for the hard work in making this happen @sidorares :) |
|
Looks like I'm still having issues with 8.0, and sha256_password. Getting:
|
|
what's your server version @mwalden2004 ? Plugin name is different from what most 8.x server report ( notice it's |
|
Didn't notice, sorry! The version is 8.0.18. Trying everything I can to fix this error, but no matter what I change the users plugin type to, it doesn't work. |
|
you could manually alias it like this: const caching_sha2_password = require('mysql2/lib/auth_plugins/caching_sha2_password.js');
const connection = mysql.createConnection({
authPlugins: {
sha256_password: caching_sha2_password({})
}
})( didn't test that but hope you get the idea ) |
|
Still getting the same error with that code, I made sure that I am running the latest version of mysql2. Don't know what to do from here. Thank you for the assistance so far. |
|
could you try to debug this lines ( with console.log or debugger ) ? node-mysql2/lib/commands/auth_switch.js Lines 42 to 50 in ebc2cb4 check spelling and what server expects vs what is actually in authPlugins Note that I slightly updated the example, |
|
@ruiquelhas any idea what servers return |
|
Okay, looking into this now. So it looks like authSwitchRequest is called two times, the first it sends in sha256_password as the plugin name, and the second time standardAuthPlugins is undefined. After which it appears it errors out with the throw Error() |
|
I've added an alias inside the auth switch, and now it's trying to force me to use root! I'll look into this in the morning. Good night! |
|
@sidorares https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html |
|
@mwalden2004 looks like using |
|
Adding support for |
|
Well here is where this gets really interesting, I have two other projects running off this database on the server running mysql2, but this is the only one having any issues. I also am not using sha256_password, looks like it is being forced... |
|
auth plugin can be configured per user / ip. Are those same for two other projects? |
|
They are the same. |
|
@mwalden2004 did you find any solution for sha256_password |
* add mysql environment to dev * use mysql2 instead of mysql to support Mysql8 sidorares/node-mysql2#1021
|
this happened to me as well, it was working fine, all of the sudden it stopped working |
|
Hi @Pezhvak can you clarify exactly what stopped working? Note that we recently added support for |
|
@sidorares it started giving me that error message which i didn't get before, it turns out to be a problem with terminal which runs it, if i run it on iterm i get that error, if i run it inside phpstorm i don't get that (using run feature of the ide), i can experiment more and let you know if you will. |
|
@Pezhvak are you using the same node installation? I could imagine that you might have a global installation with a different version and one node installation picks it up, giving you old code. Running |
|
i will check it and get back to you @johannes |
|
This just started happening to me out of nowhere, after Windows Terminal updated. I don't have any plugin, I don't know what that message is talking about. |
|
this happened to me, it seems to be something related to user or where from you call your file |
still WIP, but tests pass and I think now it's only matter of adding docs
caching_sha2_passwordandmysql_native_passwordauth methodsthis would not be possible without mysqljs/mysql#1962
cc @ruiquelhas and @johannes
some related previous API discussion:
mysqljs/mysql#1793
#560
should fix:
#906
#991