[GH-ISSUE #31] ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client #30

Closed
opened 2026-02-26 05:33:14 +03:00 by kerem · 6 comments
Owner

Originally created by @coolsaber57 on GitHub (Nov 29, 2018).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/31

Hello,

I'm trying to get this running by following your examples, but am running into some issues. I'm brand new to Docker/Docker-compose, but I've been trying to google/look through the issues list, but don't see this one.

Here is my config.json:
{ "database": { "engine": "mysql", "host": "db", "name": "nginxproxymanager", "user": "nginxproxymanager", "password": "password", "port": 3306 } }

(I had 127.0.0.1 in the Host value, but it gave me a connection refused error)

and here is my docker-compose.yaml file:

version: "3" services: app: image: jc21/nginx-proxy-manager:2 restart: always ports: - 80:80 - 81:81 - 443:443 volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db environment: # if you want pretty colors in your docker logs: - FORCE_COLOR=1 db: image: mysql restart: always environment: MYSQL_ROOT_PASSWORD: "password" MYSQL_DATABASE: "nginxproxymanager" MYSQL_USER: "nginxproxymanager" MYSQL_PASSWORD: "password" volumes: - ./data/mysql:/var/lib/mysql

After running the "docker-compose up -d" command, I get the following error over and over (as seen in the Portainer UI):
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client,

I'm sure I'm missing some noob step, so if so I apologize. Any ideas on what this could be?

Originally created by @coolsaber57 on GitHub (Nov 29, 2018). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/31 Hello, I'm trying to get this running by following your examples, but am running into some issues. I'm brand new to Docker/Docker-compose, but I've been trying to google/look through the issues list, but don't see this one. Here is my config.json: `{ "database": { "engine": "mysql", "host": "db", "name": "nginxproxymanager", "user": "nginxproxymanager", "password": "password", "port": 3306 } }` (I had 127.0.0.1 in the Host value, but it gave me a connection refused error) and here is my docker-compose.yaml file: `version: "3" services: app: image: jc21/nginx-proxy-manager:2 restart: always ports: - 80:80 - 81:81 - 443:443 volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db environment: # if you want pretty colors in your docker logs: - FORCE_COLOR=1 db: image: mysql restart: always environment: MYSQL_ROOT_PASSWORD: "password" MYSQL_DATABASE: "nginxproxymanager" MYSQL_USER: "nginxproxymanager" MYSQL_PASSWORD: "password" volumes: - ./data/mysql:/var/lib/mysql` After running the "docker-compose up -d" command, I get the following error over and over (as seen in the Portainer UI): ` ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client,` I'm sure I'm missing some noob step, so if so I apologize. Any ideas on what this could be?
kerem closed this issue 2026-02-26 05:33:14 +03:00
Author
Owner

@jc21 commented on GitHub (Nov 29, 2018):

Yeah that is a new one. I suspect that the latest mysql docker image has some changes that haven't been tested with this project yet.

I probably should update the docs with this tip:

You can use a docker image I've forked from Maria that has baked in configuration to use their Aria database engine, which will provide more stability in unexpected docker-type situations. It has been tested with this project. So, your docker-compose.yml should look like:

version: "3"
services:
  app:
    image: jc21/nginx-proxy-manager:2
    restart: always
    ports:
      - 80:80
      - 81:81
      - 443:443
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db
    environment:
      # if you want pretty colors in your docker logs:
      - FORCE_COLOR=1
  db:
    image: jc21/mariadb-aria
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: "password"
      MYSQL_DATABASE: "nginxproxymanager"
      MYSQL_USER: "nginxproxymanager"
      MYSQL_PASSWORD: "password"
    volumes:
      - ./data/mysql:/var/lib/mysql

However before using this, you'll want to delete your ./data/mysql directory as it will contain files from the previous mysql image that won't be compatible with this one.

<!-- gh-comment-id:443025090 --> @jc21 commented on GitHub (Nov 29, 2018): Yeah that is a new one. I suspect that the `latest` mysql docker image has some changes that haven't been tested with this project yet. I probably should update the docs with this tip: You can use a docker image I've forked from Maria that has baked in configuration to use their Aria database engine, which will provide more stability in unexpected docker-type situations. It has been tested with this project. So, your `docker-compose.yml` should look like: ```yml version: "3" services: app: image: jc21/nginx-proxy-manager:2 restart: always ports: - 80:80 - 81:81 - 443:443 volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db environment: # if you want pretty colors in your docker logs: - FORCE_COLOR=1 db: image: jc21/mariadb-aria restart: always environment: MYSQL_ROOT_PASSWORD: "password" MYSQL_DATABASE: "nginxproxymanager" MYSQL_USER: "nginxproxymanager" MYSQL_PASSWORD: "password" volumes: - ./data/mysql:/var/lib/mysql ``` However before using this, you'll want to delete your `./data/mysql` directory as it will contain files from the previous mysql image that won't be compatible with this one.
Author
Owner

@coolsaber57 commented on GitHub (Nov 30, 2018):

Awesome, thank you, I will give this a try.

<!-- gh-comment-id:443232818 --> @coolsaber57 commented on GitHub (Nov 30, 2018): Awesome, thank you, I will give this a try.
Author
Owner

@coolsaber57 commented on GitHub (Nov 30, 2018):

Hmm, now I'm getting:

[11/30/2018] [9:16:37 PM] [Global ] › ✖ error connect ECONNREFUSED 127.0.0.1:3306

I also tried with "db" in my json.config file. Should I be using a different IP address in the json.config?

<!-- gh-comment-id:443342348 --> @coolsaber57 commented on GitHub (Nov 30, 2018): Hmm, now I'm getting: `[11/30/2018] [9:16:37 PM] [Global ] › ✖ error connect ECONNREFUSED 127.0.0.1:3306` I also tried with "db" in my json.config file. Should I be using a different IP address in the json.config?
Author
Owner

@coolsaber57 commented on GitHub (Dec 4, 2018):

Argh! I feel like it's so close, but I keep getting ECONNREFUSED. On suggestion from a reddit user, I added a line to the docker-compose file for "hostname: db", so now my two files look like this:

docker-compose.yaml:

version: "3"
services:
  app:
    image: jc21/nginx-proxy-manager:2
    restart: always
    ports:
      - 80:80
      - 81:81
      - 443:443
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db
    environment:
      # if you want pretty colors in your docker logs:
      - FORCE_COLOR=1
  db:
    image: jc21/mariadb-aria
    hostname: db
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: "mypwd"
      MYSQL_DATABASE: "nginxproxymanager"
      MYSQL_USER: "nginxproxymanager"
      MYSQL_PASSWORD: "mypwd"
    volumes:
      - ./data/mysql:/var/lib/mysql

config.json:

{
  "database": {
    "engine": "mysql",
    "host": "db",
    "name": "nginxproxymanager",
    "user": "nginxproxymanager",
    "password": "mypwd",
    "port": 3306
  }
}

Any advice on getting this running/what I can check?

<!-- gh-comment-id:444240754 --> @coolsaber57 commented on GitHub (Dec 4, 2018): Argh! I feel like it's so close, but I keep getting ECONNREFUSED. On suggestion from a reddit user, I added a line to the docker-compose file for "hostname: db", so now my two files look like this: **docker-compose.yaml:** ``` version: "3" services: app: image: jc21/nginx-proxy-manager:2 restart: always ports: - 80:80 - 81:81 - 443:443 volumes: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db environment: # if you want pretty colors in your docker logs: - FORCE_COLOR=1 db: image: jc21/mariadb-aria hostname: db restart: always environment: MYSQL_ROOT_PASSWORD: "mypwd" MYSQL_DATABASE: "nginxproxymanager" MYSQL_USER: "nginxproxymanager" MYSQL_PASSWORD: "mypwd" volumes: - ./data/mysql:/var/lib/mysql ``` **config.json:** ``` { "database": { "engine": "mysql", "host": "db", "name": "nginxproxymanager", "user": "nginxproxymanager", "password": "mypwd", "port": 3306 } } ``` Any advice on getting this running/what I can check?
Author
Owner

@coolsaber57 commented on GitHub (Dec 4, 2018):

Last comment - OK, the issue was that I thought that I was deleting the hidden ./data/mysql folder when I told Portainer to remove the volumes. I'm not totally sure what that actually does, but I remembered your comment to delete the folder, so I thought I'd just try and remove it with:

sudo rm -rf ./data/mysql

Then

docker-compose up -d

And voila! It works now!

<!-- gh-comment-id:444244660 --> @coolsaber57 commented on GitHub (Dec 4, 2018): Last comment - OK, the issue was that I thought that I was deleting the hidden ./data/mysql folder when I told Portainer to remove the volumes. I'm not totally sure what that actually does, but I remembered your comment to delete the folder, so I thought I'd just try and remove it with: `sudo rm -rf ./data/mysql` Then `docker-compose up -d` And voila! It works now!
Author
Owner

@jc21 commented on GitHub (Dec 4, 2018):

Lol yep that's the solution :)

I meant to get back to your earlier but work got in the way.. Glad it's fixed!

<!-- gh-comment-id:444287245 --> @jc21 commented on GitHub (Dec 4, 2018): Lol yep that's the solution :) I meant to get back to your earlier but work got in the way.. Glad it's fixed!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#30
No description provided.