Portabase Logo
Portabase AgentDatabases

MariaDB

Configuration for MariaDB.

The agent will use mariadb-dump to perform backups and restore backups.

Configuration

{
  "name": "Database - MariaDB",
  "database": "mariadb",
  "type": "mariadb",
  "username": "mariadb",
  "password": "changeme",
  "port": 3306,
  "host": "db-mariadb",
  "generated_id": "..."
}

Docker Compose Example

Example with a MariaDB image.

docker-compose.yml
services:
  db-mariadb:
    container_name: db-mariadb
    image: mariadb:latest
    ports:
      - "3311:3306"
    environment:
      - MYSQL_DATABASE=mariadb
      - MYSQL_USER=mariadb
      - MYSQL_PASSWORD=changeme
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - mariadb-data:/var/lib/mysql
    networks:
      - portabase

  agent:
    image: portabase/agent:latest
    # ... agent configuration ...
    depends_on:
      - db-mariadb
    networks:
      - portabase

networks:
  portabase:
    external: true

volumes:
  mariadb-data:

If you use localhost as the host (because the agent is on the host machine and not in Docker, or via host-gateway), ensure your database is listening on all interfaces (0.0.0.0) or is accessible from the agent.

Last updated on

On this page