this post was submitted on 03 Dec 2023
2 points (100.0% liked)

Docker

1091 readers
1 users here now

founded 1 year ago
MODERATORS
 

Not sure what I'm doing wrong here, I'm using this image:

https://hub.docker.com/r/bitnami/wordpress-nginx

I updated the compose file to have un/pw for mariadb:

  mariadb:
    image: docker.io/bitnami/mariadb:11.1
    volumes:
      - '/etc/docker/mariadb-persist:/bitnami/mariadb'
    environment:
      - ALLOW_EMPTY_PASSWORD=no
      - MARIADB_USER=admin
      - MARIADB_PASSWORD=admin
      - MARIADB_DATABASE=bitnami_wordpress

But I get this error:

2023-12-03 19:03:02 3 [Warning] Access denied for user 'admin'@'172.18.0.3' (using password: NO)

using password: NO??

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 10 months ago* (last edited 10 months ago) (1 children)

Delete the - ALLOW_EMPTY_PASSWORD=no

Look at using docker-compose as you'll likely want to connect other containers to that DB so you don't have MariaDB containers everywhere

https://www.howtogeek.com/devops/what-is-docker-compose-and-how-do-you-use-it/

Once you're using docker-compose you no longer need to store user credentials in plaintext which is really not the best practice

https://docs.docker.com/compose/use-secrets/