Database error connection using docker compose #8647
Replies: 2 comments
-
Hi @CarmineMolisso, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @mertmit , thanks a lot for the support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to install NocoDb using the configuration found in the following repository: https://github.com/nocodb/nocodb/blob/master/docker-compose/nginx/docker-compose.yml
I already have an NGINX Reverse proxy on the machine and also certbot so I removed these services.
My file is the following:
`version: "3.9"
networks:
backend:
external: false
default:
services:
nocodb_app:
container_name: nocodb_app
depends_on:
- nocodb_database
environment:
NC_AUTH_JWT_SECRET: "${NC_AUTH_JWT_SECRET}"
NC_DB: "mysql2://192.168.48.2:3306?u=root&p=${MYSQL_ROOT_PASSWORD}&d=${MYSQL_DATABASE}"
NC_PUBLIC_URL: "${NC_PUBLIC_URL}"
image: "nocodb/nocodb:latest"
networks:
- backend
- default
restart: unless-stopped
volumes:
- "./nocodb/data:/usr/app/data"
nocodb_database:
container_name: nocodb_database
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
image: "ghcr.io/linuxserver/mariadb:alpine"
networks:
- backend
restart: always
volumes:
- "./mariadb/config:/config"
- "./mariadb/data:/var/lib/mysql"
`
Then I have an .env file with the variables.
In the database string connection I tested different configurations:
Although the containers are in the same sub-net it seems that they are not able to establish a connection because I got the following error:
ERROR [ExceptionHandler] Error: Access denied for user 'root'@'nocodb_app.nocodb_backend' (using password: YES)
Error: Error: Access denied for user 'root'@'nocodb_app.nocodb_backend' (using password: YES)
Anyone can help me?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions