File: //proc/1234691/cwd/opt/script-db/theapphouse.sh
#!/bin/sh -e
host=localhost
dbName=theapphouse2
user=theapphouse2
password=Dreams@99
if [ -z "host" ]
then
host="localhost"
fi
# drop all the tables in the database
for i in `mysql -h$host -u$user -p$password $dbName -e "show tables" | grep -v Tables_in` ; do echo $i && mysql -h$host -u$user -p$password $dbName -e "SET FOREIGN_KEY_CHECKS = 0; drop table $i ; SET FOREIGN_KEY_CHECKS = 1" ; done
#mysql -h dreamguysall.c2savs4iodqc.eu-west-1.rds.amazonaws.com --user=truelysell-wp --password=Dreams@99 truelysell-wp < /opt/script-db/truelysell-wp.sql
mysql -h localhost --user=theapphouse2 --password=Dreams@99 theapphouse2 < /mnt/data/theapphouse/mysql/dtlive.sql