/mysql

Primary LanguageShell

MySQL Deployment

This deployment comes with admine, it requires a volume for mysql mysql-data. Common environment variables can be set in an env file; there is a sample config file in this repository: config/local.env

Useful commands

  1. Create volumes (once)

        docker volume create mysql-data
  2. Run with Docker Compose

        cd <project root>
        docker-compose --env-file ./config/local.env up -d
  3. Delete the deployment

        cd <project root>
        docker-compose down
  4. Take database backup

        mysqldump -h 0.0.0.0 -u<username> -p<password> <database> [<tablename>] > <backup_filename>.sql