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

[Bug?] Changing the docker compose file's Username and password causes a 'ER_ACCESS_DENIED_ERROR' #4317

Open
barrrricade opened this issue Jan 23, 2025 · 0 comments
Labels

Comments

@barrrricade
Copy link

barrrricade commented Jan 23, 2025

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
I haven't tested this extensively. But i can only get nginx proxy manager working only with the default docker-compose.yaml. I tried using a different password and

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
     # DB_MYSQL_USER: "<changed this>" # doesn't work
      DB_MYSQL_USER: "npm"
      # DB_MYSQL_PASSWORD: "<changed this>" # doesn't work
      DB_MYSQL_PASSWORD: "npm"
      # DB_MYSQL_NAME: "<changed this>" # doesn't work
      DB_MYSQL_NAME: "npm"

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    environment:
# Doesn't work
     # MYSQL_ROOT_PASSWORD: '<changed this>'
     # MYSQL_DATABASE: '<changed this>'
     # MYSQL_USER: '<changed this>'
     # MYSQL_PASSWORD: '<changed this>'

      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'

    volumes:
      - ./mysql:/var/lib/mysql

On a new installation:
If I try to change the Password/usernames I get a: Bad gateway when logging in with [email protected] and changeme
docker compose logs app shows 'ER_ACCESS_DENIED_ERROR' "Access denied for user 'npm'@'172.21.0.3' (using password: YES)"

I have to use the default's for it to work.

Nginx Proxy Manager Version
v2.11.1

To Reproduce
Steps to reproduce the behavior:
copy the yaml file from above into /opt/nginxproxymanager
change the lines:

      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"

      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'

run docker compose docker compose up -d

Login to localhost:81 and use [email protected] and changeme.
shows bad gateway

docker compose logs app shows

app-1  |   code: 'ER_ACCESS_DENIED_ERROR',
app-1  |   errno: 1045,
app-1  |   sqlState: '28000',
app-1  |   sqlMessage: "Access denied for user 'npm'@'172.21.0.3' (using password: YES)",

keep the user names and password to npm -> works

Screenshots

Operating System
Ubuntu 22.04.5 x84_64

Additional context
I've tried:

  1. Access Denied Error #577
  2. Deleting the ./data folder https://www.reddit.com/r/nginxproxymanager/comments/o8fer3/er_access_denied_error/
  3. made sure passwords didn't have 'symbols'
  4. made sure that the folders are in the right structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant