Access denied to database on new Docker setup #837

Closed
opened 2021-04-17 08:31:36 +00:00 by trmckay · 2 comments

I am trying to get Vikunja running behind NGINX proxy manager. I have a proxy host configured to forward todo.mydomain.com to port 80 of the vikunja-frontend Docker image.

Here is my docker-compose.yml with the secrets changed to the default:

version: '3'

services:

  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: supersecret
      MYSQL_DATABASE: vikunja
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped

  api:
    image: vikunja/api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: supersecret
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: root
      VIKUNJA_DATABASE_DATABASE: vikunja
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - db
    restart: unless-stopped

  frontend:
    image: vikunja/frontend
    restart: unless-stopped

networks:
  default:
    external:
      name: nginx

It's nearly straight out of the documentation.

At the very least, the service is discoverable. I can register, log-in, and create tasks.

However, I am plagued with error 500 messages while using the frontend. Weirdly enough, I press buttons enough times it will work; I would guess 1/4 of presses work.

Also, in the Docker logs. This error shows up when trying to do something on the fronted.

Access denied for user 'root'@'172.18.0.12'

So, something is wrong with the database, but not sure what.

I am trying to get Vikunja running behind NGINX proxy manager. I have a proxy host configured to forward todo.mydomain.com to port 80 of the vikunja-frontend Docker image. Here is my docker-compose.yml with the secrets changed to the default: ``` version: '3' services: db: image: mariadb:10 command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci environment: MYSQL_ROOT_PASSWORD: supersecret MYSQL_DATABASE: vikunja volumes: - ./db:/var/lib/mysql restart: unless-stopped api: image: vikunja/api environment: VIKUNJA_DATABASE_HOST: db VIKUNJA_DATABASE_PASSWORD: supersecret VIKUNJA_DATABASE_TYPE: mysql VIKUNJA_DATABASE_USER: root VIKUNJA_DATABASE_DATABASE: vikunja volumes: - ./files:/app/vikunja/files depends_on: - db restart: unless-stopped frontend: image: vikunja/frontend restart: unless-stopped networks: default: external: name: nginx ``` It's nearly straight out of the documentation. At the very least, the service is discoverable. I can register, log-in, and create tasks. However, I am plagued with error 500 messages while using the frontend. Weirdly enough, I press buttons enough times it will work; I would guess 1/4 of presses work. Also, in the Docker logs. This error shows up when trying to do something on the fronted. ``` Access denied for user 'root'@'172.18.0.12' ``` So, something is wrong with the database, but not sure what.
Owner

That sounds like a deployment issue. Is there anything in the Vikunja logs?

That sounds like a deployment issue. Is there anything in the Vikunja logs?
Owner

Closing due to inactivity. Feel free to reopen.

Closing due to inactivity. Feel free to reopen.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
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: vikunja/vikunja#837
No description provided.