diff options
author | tangpeng <tang.peng5@zte.com.cn> | 2017-03-03 15:41:57 +0800 |
---|---|---|
committer | tangpeng <tang.peng5@zte.com.cn> | 2017-03-03 15:45:49 +0800 |
commit | 714a1b78f7a00ea71534c7aebde097fafc560d77 (patch) | |
tree | 2fe351f1911b181d4282044804c192f477d7e958 /rulemgt-standalone/src/main/assembly/bin/initDB.sh | |
parent | 9e49960fc851a0cdf51a3607b21984628d1e9d44 (diff) |
Modify sql scripts
Change-Id: I927f848c26580e3ed7abc1fd88d4908ff1139075
Issue-ID: HOLMES-47
Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/src/main/assembly/bin/initDB.sh')
-rw-r--r-- | rulemgt-standalone/src/main/assembly/bin/initDB.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rulemgt-standalone/src/main/assembly/bin/initDB.sh b/rulemgt-standalone/src/main/assembly/bin/initDB.sh index a58450b..905ad1b 100644 --- a/rulemgt-standalone/src/main/assembly/bin/initDB.sh +++ b/rulemgt-standalone/src/main/assembly/bin/initDB.sh @@ -24,8 +24,13 @@ host=$4 echo "start init holmes rulemgt db" main_path=$HOME/../ cat $main_path/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql +echo "user="$user +echo "password"$password +echo "port="$port +echo "host="$host mysql -u$user -p$password -P$port -h$host <$main_path/dbscripts/mysql/openo-holmes_rulemgt-createobj.sql sql_result=$? +cat "sql_result="$sql_result if [ $sql_result != 0 ] ; then echo "failed to init rulemgt database!" exit 1 |