NginxProxyManager / NginxProxyManager/nginx-proxy-manager
[Bug?] Changing the docker compose file's Username and password causes a 'ER_ACCESS_DENIED_ERROR'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker 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 admin@example.com 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 admin@example.com 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:
- https://github.com/NginxProxyManager/nginx-proxy-manager/issues/577
- Deleting the
./datafolder https://www.reddit.com/r/nginxproxymanager/comments/o8fer3/er_access_denied_error/ - made sure passwords didn't have 'symbols'
- made sure that the folders are in the right structure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker-compose YAML in the issue and the docker compose logs app output showing ER_ACCESS_DENIED_ERROR; compare the default credentials with the custom DB_MYSQL_* and MYSQL_* settings and the mounted ./mysql volume. Done means a fresh installation can start and log in successfully with changed database credentials instead of returning Bad Gateway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, mariadb
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100