Mysqldump有多个表? [英] Mysqldump more than one table?

查看:73
本文介绍了Mysqldump有多个表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用mysqldump转储以公共前缀开头的某些表?

How can I use mysqldump to dump certain tables that start with common prefix?

推荐答案

呵呵,这有点像骇客,但它可以工作(使用bash):

Hehe, this is kind of a hack, but it works (using bash):

mysqldump -u USER -p DATABASE $(mysql -u USER -p -D DATABASE -Bse "show tables like 'PREFIX%'") > /tmp/DATABASE.out

根据需要更改ALLCAPS单词.

Change the ALLCAPS words as needed.

这篇关于Mysqldump有多个表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆