mysql icon indicating copy to clipboard operation
mysql copied to clipboard

ER_NOT_SUPPORTED_AUTH_MODE with mysql_native_password

Open Rodentman87 opened this issue 4 years ago • 13 comments

I have a user set up with mysql_native_password authentication, verified here:

mysql> select user, plugin from mysql.user where user="testuser";
+----------+-----------------------+
| user     | plugin                |
+----------+-----------------------+
| testuser | mysql_native_password |
+----------+-----------------------+

I also made sure to flush privileges to ensure everything was updated on MySQL's side, but when I try to log in, it's still giving me an ER_NOT_SUPPORTED_AUTH_MODE.

MySQL v8.0.19 Library version 2.18.1

Rodentman87 avatar Jul 14 '20 04:07 Rodentman87

Hi @Rodentman87 over this weekend I was tracking down a similar issue and so was just getting the plugin auth working on this module, which seems to fix the issue. I'll push up a test branch for you to try to validate this tomorrow (my time; approx 8 hours from now) and then let me know how it works out for you.

dougwilson avatar Jul 14 '20 04:07 dougwilson

Hi, Also I am getting this error when user name is wrong

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

vijay94 avatar Jul 15 '20 19:07 vijay94

@dougwilson any update on that test branch?

Rodentman87 avatar Jul 17 '20 05:07 Rodentman87

?

prinze77 avatar Jul 27 '20 14:07 prinze77

Use this module support mysql_native_password npm install mysql8.0

https://www.npmjs.com/package/mysql8.0?activeTab=versions

punixxher avatar Jul 28 '20 15:07 punixxher

I got same Error!

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

MYSQL VERSION: mysql Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL) mysqljs-version: 2.18.1

mysql> SELECT plugin FROM mysql.user WHERE User = 'root';
+-----------------------+
| plugin                |
+-----------------------+
| mysql_native_password |
| mysql_native_password |
+-----------------------+
2 rows in set (0.00 sec)

panda8z avatar Jul 31 '20 04:07 panda8z

Hey everyone, I just wanted to say I haven't forgot about this; I recently changed jobs and of course during that process can be a bit hectic. I will get my test changed pushed up here as a branch so you folks can test it on your set ups to check if it resolves your issue or we need to dig further. I am heading to sleep right now, but after work on Friday I will make the time to work through this issue in this module with anyone around 👍

dougwilson avatar Jul 31 '20 05:07 dougwilson

Hey, just wondering if there was any updates on this yet. I ended up using something else temporarily, but this issue also seems to be affecting dependent libraries (in my case prisma).

Rodentman87 avatar Oct 01 '20 06:10 Rodentman87

Same issue here. Were you able to resolve this?

drwharris avatar Dec 03 '20 02:12 drwharris

Same issue.

baba43 avatar Jan 09 '21 12:01 baba43

Hey everyone, I just wanted to say I haven't forgot about this; I recently changed jobs and of course during that process can be a bit hectic. I will get my test changed pushed up here as a branch so you folks can test it on your set ups to check if it resolves your issue or we need to dig further. I am heading to sleep right now, but after work on Friday I will make the time to work through this issue in this module with anyone around 👍

hi @dougwilson , first of all thanks for all your contributions to this project. I just wanted to know if you still plan to work on this feature, otherwise I'll have to look into an alternative package for my project to use mysql 8.0

FrancescoBorzi avatar Apr 19 '21 09:04 FrancescoBorzi

Hi @FrancescoBorzi you're always welcome to look for alternatives; mysql2 is a direct one for example. I am planning to take a look and have been working on the new major version of this module to remove a lot of cruft in the code, and redesign the way the parser works to get aome of the hard to support things like compression added. This also includes auth plugins support, which is this issue. I'll get an alpha/beta published up soon and link it on here.

dougwilson avatar Nov 02 '21 12:11 dougwilson

@dougwilson thanks for the update, I look forward to integrating the new version into my app

FrancescoBorzi avatar Nov 02 '21 23:11 FrancescoBorzi