Required tools
Capsule usesmysqldump to create backups and mysql to restore them.
- Debian / Ubuntu
- RHEL / CentOS / Amazon Linux
- macOS
Connection details
Authentication
How Capsule passes your password tomysqldump depends on whether the connection is Docker-based or native:
- Native (MySQL running directly on the server): Capsule writes a temporary MySQL options file (mode
0600, readable only by the process that created it) containing your password, passes it tomysqldumpvia--defaults-file, and deletes it immediately after the backup completes. This mirrors how Capsule handles PostgreSQL passwords via a temporary.pgpassfile. - Docker:
docker execcan’t read a config file sitting on the host filesystem, so Capsule instead injects the password as theMYSQL_PWDenvironment variable directly into the container process.
ps aux) and is not left on disk after the backup finishes.
Dump flags
Capsule runsmysqldump with no extra consistency flags, which means it takes table locks while dumping — on a busy production database, this can briefly block writes during the backup window. If your tables are InnoDB and you need a lock-free, consistent snapshot, run backups during a low-traffic window until this is configurable.
Docker
If MySQL runs in a Docker container, enter the container name in the Docker field when adding the connection. Capsule will exec into the container to runmysqldump, so no host-side MySQL tools are needed.
See Docker containers for details.
Troubleshooting
Access denied for user
- Confirm the username and password are correct
- Make sure the user has
SELECT,LOCK TABLES,SHOW VIEW,EVENT, andTRIGGERprivileges on the target database
mysqldump: command not found
Install MySQL client tools and run capsule doctor to confirm.
MariaDB
MariaDB is fully supported. The mysqldump binary shipped with MariaDB works identically for Capsule’s purposes.