mysql_host=$1
db_name=$2
target_db_port=$3
sql_file_folder=/home/qa-deploy-utils/db-utils/foreign_key

echo "cd $sql_file_folder"
cd $sql_file_folder
if [ -n "$db_name" ];then
    if [ -f $db_name.sql ];then
        echo "exec foreign base sql"
        echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest < $db_name.sql"
        mysql -h $mysql_host -P $target_db_port -uqa -pqatest < $db_name.sql
    else
        echo "have no $db_name foreign base sql"
    fi
fi