Commit 77a02a12 authored by 智勇's avatar 智勇

fix

parent 4fcc3696
...@@ -8,14 +8,15 @@ ...@@ -8,14 +8,15 @@
mysql_host=$1 mysql_host=$1
db_name=$2 db_name=$2
target_db_port=$3
sql_file_folder=/home/qa-deploy-utils/db-utils/sql_to_run sql_file_folder=/home/qa-deploy-utils/db-utils/sql_to_run
echo "cd $sql_file_folder" echo "cd $sql_file_folder"
cd $sql_file_folder cd $sql_file_folder
if [ -n "$db_name" ];then if [ -n "$db_name" ];then
if [ -f $db_name.sql ];then if [ -f $db_name.sql ];then
echo "mysql -h $mysql_host -uqa -pqatest < $db_name.sql" echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest < $db_name.sql"
mysql -h $mysql_host -uqa -pqatest < $db_name.sql mysql -h $mysql_host -P $target_db_port -uqa -pqatest < $db_name.sql
else else
echo "have no $db_name.sql" echo "have no $db_name.sql"
fi fi
...@@ -23,6 +24,6 @@ else ...@@ -23,6 +24,6 @@ else
for entry in ./* for entry in ./*
do do
echo "run sql file: $entry" echo "run sql file: $entry"
mysql -h $mysql_host -uqa -pqatest < $entry mysql -h $mysql_host -P $target_db_port -uqa -pqatest < $entry
done done
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment