for i in rm-xxxxzh809 rm-xxx0dl80430
do
echo $i
mkdir -p /tmp/db/${i}/
mysql -uroot -p'xxxx' -h ${i}.mysql.rds.aliyuncs.com -N -e "show databases" |egrep -v 'test|sys|performance_schema|mysql|information_schema|recycle_bin' |xargs -i bash -c "/usr/bin/mysqldump -uroot -p'xxxx' -h ${i}.mysql.rds.aliyuncs.com --skip-add-locks --skip-add-drop-table --single-transaction --no-data --databases {} > /tmp/db/${i}/{}.sql"
done
mysql批量导出库表结构
最新推荐文章于 2024-05-14 17:48:44 发布