#!/bin/bash
dbs=`curl http://localhost:10088/config_server/get_db_config/all/name`\
db_file=/tmp
for db in $dbs
do
	sql_command=`curl http://localhost:10088/config_server/get_db_dump_command/${db}`
	$sql_command > ${db_file}/${db}.sql
	mysql -h 192.168.6.2 -P 3306 -uqa -pqatest db < ${db_file}/${db}.sql
done