[Solved] Problem connecting to local MariaDB

Hello,

I’m installing Pydio for the first time on my local machine to try it out. I followed the instructions for Launching Docker, but swapping MariaDB in for Mysql in the docker-compose file. Both MariaDB and Pydio images install and start up fine, and I’m able to connect to the MariaDB instance from a local database app. When I go to install Pydio from localhost:8080, I run into a problem at the database configuration(see attached image). Is there a step I’m missing, or do I need run another version of MariaDB? Any thoughts are appreciated. Thanks.

Below is my docker-compose file:

version: '3'
services:

    # Cells image with two named volumes for the static and for the data
    cells:
        image: pydio/cells:latest
        restart: always
        volumes: ["static:/root/.config/pydio/cells/static/pydio", "data:/root/.config/pydio/cells/data"]
        ports: ["8080:8080"]
        environment:
            - CELLS_BIND=localhost:8080
            - CELLS_EXTERNAL=localhost:8080
            - CELLS_NO_SSL=1

    # mariaDB image with a default database cells and a dedicated user pydio
    mariadb:
         image: mariadb
         restart: always
         environment:
             MYSQL_ROOT_PASSWORD: P@ssw0rd
             MYSQL_DATABASE: cells
             MYSQL_USER: pydio
             MYSQL_PASSWORD: P@ssw0rd
         command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
         ports: ["3306:3306"]

volumes:
    static: {}
    data: {}

Hi,
the database is located inside another container, if you use 127.0.0.1 you are reaching the loopback of the cells container, meaning it tries to reach itself,
to connect with the database either use the host ip + the exposed port, the container ip (because you launched them in a docker compose you can contact the container by it’s ip) or the container name (the mariadb one).

Thank you for the explanation. I was got it to work with the container name as you suggested.