for database in $databaseList;
do
if [ $database == "mysql" ]; then
continue
fi
if [ $database == "Database" ]; then
continue
fi
if [ $database == "destination_data" ]; then
continue
fi
if [ $database == "performance_schema" ]; then
continue
fi
if [ $database == "sys" ]; then
continue
fi
if [ $database == "information_schema" ]; then
continue
fi
mysqldump -h$host -P$port -u$user -p$pwd $database > $database.sql
DATE_N=date "+%Y-%m-%d %H:%M:%S"
echo "$DATE_N $database sucessed."
sleep 1
done`
`host=127.0.0.1 port=3306 user=root pwd=123456
databaseList=
mysql -h$host -P$port -u$user -p$port -e "show databases" | awk '{print $1}'|xargs
for database in $databaseList; do if [ $database == "mysql" ]; then continue fi if [ $database == "Database" ]; then continue fi if [ $database == "destination_data" ]; then continue fi if [ $database == "performance_schema" ]; then continue fi if [ $database == "sys" ]; then continue fi if [ $database == "information_schema" ]; then continue fi mysqldump -h$host -P$port -u$user -p$pwd $database > $database.sql DATE_N=
date "+%Y-%m-%d %H:%M:%S"
echo "$DATE_N $database sucessed." sleep 1 done`