Installation of api using docker fails with error 1045

I get the following error below every tine I try to spin up a docker container for the api using docker-compose.

vikunja-db-1   | Version: '10.11.2-MariaDB-1:10.11.2+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
vikunja-db-1   | 2023-03-01 19:00:34 3 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
vikunja-api-1  | 2023-03-01T19:00:34.130026847Z: CRITICAL       ▶ migration/Migrate 002 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)

I have another docker container that also relies on mariadb on port 3306, and I wonder if that could be a source of conflict?
Also I am using the generic mariadb root password in the yml file provided by the docs (‘supersecret’). Should that be change to the mariadb root password currently in system?

As long as you keep them in separate docker networks, it should be fine.

You mean you did not change the password in Vikunja but on the mariadb container?

Can you share your compose file?

Hey, sorry it was a stupid mistake. I didn’t realize that the password for mysql/maria database in the yml file has to be the same for the two services: “db” and “api”, like below:

db:
  MYSQL_PASSWORD: pass
api:
  VIKUNJA_DATABASE_PASSWORD: pass

Seems a bit redundant but I missed it.

1 Like