Search code examples
mariadbdocker-swarmbitnami

Bitnami Mariadb docker swarm


i deployed docker swarm stack with bitnami-docker-mariadb, with master and slave configuration. My problem is that i can't log on slave db (which is on second server), the message is: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES). Does anyone know reason of this issue.

Thanks in advance


Solution

  • To connect to salve you need to give value to these environment variables

          - MARIADB_REPLICATION_MODE=slave
          - MARIADB_REPLICATION_USER=repl_user
          - MARIADB_REPLICATION_PASSWORD=repl_password
          - MARIADB_MASTER_HOST=mariadb-master
          - MARIADB_MASTER_PORT_NUMBER=3306
          - MARIADB_MASTER_ROOT_PASSWORD=master_root_password