NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.78k stars 2.64k forks source link

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

Open z499738316 opened 1 year ago

z499738316 commented 1 year ago

Hello, I encountered an error connecting to MySQL while installing nginx proxy manage image I installed MySQL 8.0 in Docker,But nginx proxy management told me that the connection was wrong. Let me know image image image Can you help me check the errors? MySQL and nginx are both in the same Docker service image

z499738316 commented 1 year ago

The network is functioning normally image

DylanManiatakes commented 8 months ago

Im having this same issue, did you ever get it resolved

z499738316 commented 8 months ago

Im having this same issue, did you ever get it resolved

不要使用mysql8.0以上版本,需要使用mysql5.7版本

ggbr commented 7 months ago

It seems like you have to update the Mysql client lib

ggbr commented 7 months ago

I followed this and it resolved for Mysql 8.0.36

Execute the following query in MYSQL Workbench

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Where root as your user localhost as your URL and password as your password

Then run this query to refresh privileges:

flush privileges;

Try connecting using node after you do so.

If that doesn't work, try it without @'localhost' part.

Link: https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server

gitown commented 4 months ago

I followed this and it resolved for Mysql 8.0.36

Execute the following query in MYSQL Workbench

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Where root as your user localhost as your URL and password as your password

Then run this query to refresh privileges:

flush privileges;

Try connecting using node after you do so.

If that doesn't work, try it without @'localhost' part.

Link: https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server

This is just a workaround, but mysql_native_password is deprectaed by MySQL so NPM need to add support for caching_sha2_password

reebderdieb commented 1 month ago

Just upgraded my MySQL server to version 9.0.1, no chance now for NPM to connect to the database. Until the issue is resolved, would it be a good idea to just reinstall the proxy without a database? Have just three hosts running, so not much to do.

nlynzaad commented 1 month ago

Just upgraded my MySQL server to version 9.0.1, no chance now for NPM to connect to the database. Until the issue is resolved, would it be a good idea to just reinstall the proxy without a database? Have just three hosts running, so not much to do.

I came across the same issue yesterday. following the advice on this reddit post I was able to update the root user to use the new caching_sha2_password authentication methods. I then logged in, exported the schema, spun up a Mysql8.4 container with a npm user with native_password, restored the schema and pointed the npm container to this MySQL8.4 instance.

reebderdieb commented 1 month ago

Will try that, probably later today. Does anyone know how long NPM will need to implement the "new" password plugin? Funny enough my certificates are valid until December and the proxy still does his job, so I'm not in a hurry.

nlynzaad commented 1 month ago

I've submitted a PR that should resolve this, the underlying mysql library does not support the new authentication method, but I see they are working on a re-write to move to go in V3 so not too sure if it will get merged.

reebderdieb commented 1 month ago

Will stick around and see how things develop. In the worst case will go with a dedicated MySQL container just for NPM. Thanks.