Commit cd4498a0 authored by daidekun's avatar daidekun

fix

parent db0a54e0
#!/bin/sh
public_ip="www.q-gp.com"
sql_file_folder=./sql_to_run
set -e
set -x
# Start the MySQL daemon in the background.
/usr/sbin/mysqld &
mysql_pid=$!
until mysqladmin ping &>/dev/null; do
echo -n "."; sleep 0.2
done
# Permit root login without password from outside container.
mysql -e "GRANT ALL ON *.* TO qa@'%' IDENTIFIED BY 'qatest' WITH GRANT OPTION"
echo "cd $sql_file_folder"
cd $sql_file_folder
for entry in ./*
do
echo "run sql file: $entry"
mysql < $entry
done
# Tell the MySQL daemon to shutdown.
mysqladmin shutdown
# Wait for the MySQL daemon to exit.
wait $mysql_pid
sh /etc/init.d/mysql start
sh ./db_execute_sql.sh
sh /etc/init.d/mysql restart
\ No newline at end of file
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