开发者

How can I take MySQL dumps with some tables excluded from the database

We have a database in which one specific table gets very large very fast. When ta开发者_Go百科king a dump and then restoring this database on another server, it takes a lot of time due to the large size. I want to exclude this specific table when taking the dump. Any ideas ?


mysqldump has a --ignore-table option, something like:

mysqldump -p -u username nameofdatabase --ignore-table=verybigtable


Use the --ignore-table flag.

  --ignore-table=name Do not dump the specified table. To specify more than one
                      table to ignore, use the directive multiple times, once
                      for each table.  Each table must be specified with both
                      database and table names, e.g.,
                      --ignore-table=database.table.


Most graphical clients (like phpmyadmin) give you exclusion options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜