Portabase AgentDatabases
MySQL
Configuration for MySQL.
Add this database from the dashboard
Since Dashboard 1.29.0 and Agent 1.19.0, you can add this database directly from the dashboard (Add database on the agent page), without editing any file. See Adding a Database. The settings described below also apply to the dashboard form.
The agent will use mysqldump to perform backups and restore backups.
Configuration
When running portabase agent db add, select mysql.
Specific parameters asked:
- Database Name: The name of the database to backup.
Docker Compose Example
Example with a MySQL image.
services:
db-mysql:
container_name: db-mysql
image: mysql:9.5
ports:
- "3312:3306"
environment:
- MYSQL_DATABASE=mysqldb
- MYSQL_USER=mysqldb
- MYSQL_PASSWORD=changeme
- MYSQL_RANDOM_ROOT_PASSWORD=yes
volumes:
- mysql-data:/var/lib/mysql
networks:
- portabase
agent:
image: portabase/agent:latest
# ... agent configuration ...
depends_on:
- db-mysql
networks:
- portabase
networks:
portabase:
external: true
volumes:
mysql-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