delete_db.sh 236 B

12345678910
  1. #!/bin/bash -ex
  2. # Create new DB in dockernized sql db
  3. [ $# -eq 0 ] && { echo "Usage: $0 <database_name>"; exit 1; }
  4. source /opt/docker/db/.env
  5. docker exec db mysql -p$MYSQL_ROOT_PASSWORD --execute "DROP DATABASE $1;"
  6. rm $1__db.conf