Skip to content
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 requested by server; consider upgrading MariaDB client #246

Closed
nmggithub opened this issue May 23, 2019 · 19 comments
Assignees
Labels
bug good first issue Easy issue for beginners to start contributing to the project

Comments

@nmggithub
Copy link
Contributor

I am in college, and my University has given us each a MariaDB database login for a database course we have. PHPMyAdmin can connect, as well as the Linux mariadb package, and also the Node.js mariadb package. This extension does not work and gives the above error. I have tried the known fix and it did not solve it.

@nmggithub nmggithub added the bug label May 23, 2019
@nmggithub
Copy link
Contributor Author

Update: it appears my user is: "IDENTIFIED VIA pam". Not sure if this is what is causing the auth failure.

@mtxr
Copy link
Owner

mtxr commented May 23, 2019 via email

@mtxr
Copy link
Owner

mtxr commented May 24, 2019

@nmggithub did you get it working?

I'll close this issue, but please, re-open if you still face some problems.

@mtxr mtxr closed this as completed May 24, 2019
@nmggithub
Copy link
Contributor Author

It is MariaDB v10.1.32. And, per my last message, "I have tried the known fix and it did not solve it." So, yes I did try the xprotocol fix. It did not solve it.

@nmggithub
Copy link
Contributor Author

After looking into it some more, it appears the issue is with the mysql Node.js package. I just installed it locally and am receiving the same error. I do not receive the error when using the mariadb Node.js package. There is an open issue over at the repository for the mysql package and I informed them of this. I can look through the source code of both packages and see if I can find what the issue is.

@mtxr
Copy link
Owner

mtxr commented May 24, 2019

Which port are you using? Did you try adding a 0 in the end? Eg: 3306 -> 33060

MySQL/MariaDB xprotocol usually runs in another port.

Would you mind sharing your connection settings? blurring username, password and server of course.

I'll try to reproduce this here during the weekend.

@mtxr
Copy link
Owner

mtxr commented May 24, 2019

After looking into it some more, it appears the issue is with the mysql Node.js package. I just installed it locally and am receiving the same error. I do not receive the error when using the mariadb Node.js package. There is an open issue over at the repository for the mysql package and I informed them of this. I can look through the source code of both packages and see if I can find what the issue is.

That's awesome! If you want, you can submit a PR implementing a dialect for MariaDB only. Then we could detach the support from mysql to mariadb.

Take a look at #219 , let me know what you think

@nmggithub
Copy link
Contributor Author

After looking into it some more, it appears the issue is with the mysql Node.js package. I just installed it locally and am receiving the same error. I do not receive the error when using the mariadb Node.js package. There is an open issue over at the repository for the mysql package and I informed them of this. I can look through the source code of both packages and see if I can find what the issue is.

That's awesome! If you want, you can submit a PR implementing a dialect for MariaDB only. Then we could detach the support from mysql to mariadb.

Take a look at #219 , let me know what you think

I can definitely give that a look. I'm not sure when I will be able to fully do it as I am busy with college work. However, I will look into it.

@mtxr mtxr added the good first issue Easy issue for beginners to start contributing to the project label May 30, 2019
@nmggithub
Copy link
Contributor Author

OK, I am not sure if you noticed, but I am currently in the process of working put a pull request over at the mysqljs repository. Once done there, I can then make a pull request to this repository to add an option in the New Connection dialog, which will allow it to use the new featured added.

@mtxr
Copy link
Owner

mtxr commented May 30, 2019

Nice @nmggithub !

No hush. Let's do it in your time.

@mtxr
Copy link
Owner

mtxr commented Aug 10, 2019

@nmggithub any updates on the mysqljs issue?

@nmggithub
Copy link
Contributor Author

Hey, so sorry. I've been busy and this issue was largely in regards to connecting to the database set up by my school. I have since finished the course, so I don't really necessarily need this issue to be fixed for me personally.

@mtxr
Copy link
Owner

mtxr commented Aug 11, 2019

Thanks for the update @nmggithub. I'll close this since the aforementioned possible solutions works for most of the cases.

If this come up again in the future, we can work on this, but now I'll prioritize some other issues.

@mtxr mtxr closed this as completed Aug 11, 2019
@govindasharma1986
Copy link

Hi @mtxr,

Just now I too faced this issue. Here's a snippet for it:

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

I was trying to connect to our prod mysql server and that's when I faced it. I am able to connect to it from python mysql.connector, sqlalchemy and mysql workbench.

I wished to able to connect to it from vscode for productivity.

I read that instead of mysql package if we use mysql2 then that would solve the issue. I am not in JS so not sure about the fix. Whenever you find time, can you pls look into it?

Thanks

@govindasharma1986
Copy link

Hi @mtxr ,

Can we reopen the issue and prioritize it?

Thanks

@PvdBerg1998
Copy link

Same issue for me

@scdigitalmedia
Copy link

Having the same issue. I've tried the altering user and making updates to the mysql conf file, to no avail. Any other ideas?

@zayne-wang
Copy link

zayne-wang commented Feb 8, 2023

Same issue.

Sysinfo

item version
System Windows 11 Professional 22H2
mysql 8.0.32
vscode 1.75.0
SQLTools v0.27.1
SQLTools MySQL/MariaDB v0.5.1

Settings in SQLTools:

image

Log from SQLTools:

[1675868679377] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1675868679377] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1675868679377] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1675868679380] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1675868679380] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1675868679381] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1675868679381] INFO  (ls): Connection instance created for testdb.
    ns: "conn-manager"
[1675868679382] ERROR (ls): {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}},"name":"Error"}
    ns: "conn"
[1675868679382] ERROR (ls): Connecting error: {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}},"name":"Error"}
    ns: "conn-manager"
[1675868679382] ERROR (ls): Open connection error
    ns: "conn-manager"
[1675868679383] ERROR (ext): ERROR: Error opening connection ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client, {"code":-1,"data":{"driver":"MySQL","driverOptions":{"mysqlOptions":{"authProtocol":"default"}}}}
    ns: "error-handler"

@zayne-wang
Copy link

@nmggithub @govindasharma1986 @PvdBerg1998

I don't know if my issue same as yours.

But mine has solved, with following #1095 (comment), and changed the port to 33060, authProtocol to xprotocol and add connectionTimeout as 15 (I think any integer may be valid)

Config in SQLTools

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Easy issue for beginners to start contributing to the project
Projects
None yet
Development

No branches or pull requests

6 participants