Deploy a fast, reliable, and secure MySQL database with this production-ready container image. Maintained by Bitnami, this image is hardened, scanned for vulnerabilities, and configured to run as a non-root user, providing an extra layer of security for your applications. It simplifies database management, whether you're running a single instance or a complex cluster.
Getting started is straightforward. You can easily manage your database setup using environment variables. Key capabilities include:
/bitnami/mysql/data directory..sql or .sh scripts on startup or provide your own my.cnf file to fine-tune the server configuration to your exact needs.services:
mysql:
image: bitnami/mysql:latest
container_name: bitnami_mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=my_database
- MYSQL_USER=my_user
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- ./mysql-data:/bitnami/mysql
restart: unless-stoppedMYSQL_ROOT_PASSWORD=your_super_secret_root_password
MYSQL_PASSWORD=your_super_secret_passwordAuto-fetched 4 minutes ago