# -------------------------------------------------------------------------------
# Filename:    db_execute_sql.sh
# Revision:    1.0
# Date:        2017/03
# Author:      dekun.dai
# Description: 执行目录下所有数据库脚本
# -------------------------------------------------------------------------------

mysql_host=$1
sql_file_folder=/home/qa-deploy-utils/db-utils/sql_to_run

echo "cd $sql_file_folder"
cd $sql_file_folder

for entry in ./*
do
	echo "run sql file: $entry"
	mysql -h $mysql_host -uqa -pqatest < $entry
done