added sqldump and sqldrop commands

This commit is contained in:
Andris Reinman 2016-04-20 20:17:53 +03:00
parent 77b3ded476
commit 0f5ac18479
10 changed files with 102 additions and 215 deletions

3
setup/sql/drop.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
mysqldump -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" "-p${MYSQL_PASSWORD}" --add-drop-table --no-data "$MYSQL_DB" | grep -e '^DROP \| FOREIGN_KEY_CHECKS' | mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" "-p${MYSQL_PASSWORD}" "$MYSQL_DB"