Databases
MySQL & MariaDB
Configuration for MySQL and MariaDB.
The agent supports both MySQL and MariaDB via the same driver.
Configuration
When running portabase db add, select mysql or mariadb (it uses the same driver).
Specific parameters asked:
- Database Name: The name of the database to backup.
In your databases.json file, use the mysql type for both databases.
{
"name": "my-wp-site",
"type": "mysql",
"host": "mariadb",
"port": 3306,
"username": "root",
"password": "root_password",
"database": "wordpress",
"generatedId": "..."
}Specific Parameters:
- database: (Required) The name of the database.
Docker Compose Example
Example with a MariaDB image.
services:
mariadb:
image: mariadb:10.6
container_name: my-mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: wordpress
MYSQL_USER: wp_user
MYSQL_PASSWORD: wp_password
volumes:
- db_data:/var/lib/mysql
networks:
- portabase
agent:
image: solucetechnologies/agent-portabase:latest
# ... agent configuration ...
depends_on:
- mariadb
networks:
- portabase
networks:
portabase:
external: true
volumes:
db_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.