if [ -z "$1" ];
then
  echo "profile is blank";
  exit 0;
else
  echo "profile is set to '$1'";
fi
declare host;
declare pass;
declare db;
if [ "$1" = "pro" ];
then echo 'dump to pro';
host=mysql.izouma.com;
user=microball;
pass=2wsx@WSX#EDC;
db=jmrh;
elif [ "$1" = "test" ];
then echo 'dump to test';
host=mysql.izouma.com;
user=microball;
pass=2wsx@WSX#EDC;
db=jmrh_test;
elif [ "$1" = "local" ]; then
echo 'dump to local';
host=192.168.50.10;
user=root;
pass=123456;
db=jmrh;
else echo 'unknown db';
exit 0;
fi

echo selected db: $host $pass $db;

mysqldump -h$host -u$user -p$pass $db > dump.sql