dump 数据库
1 | mysqldump -u[user] -p[password] [db] [filePath] |
复制数据库
本地复制
1 | mysqldump -u[user] -p[password] [db] | mysql -h127.0.0.1 -u[user] -p[password] [db] |
本地中转 复制到远程
1 | ssh [root]@[ip] "mysqldump -u[user] -p[password] [db]" | ssh -C [root]@[ip] "mysql -h127.0.0.1 -u[user] -p[password] [db]" |