Nasser Heidari


Extract and Restore a Single Table from a mysqldump File

Filed under: Linux — Nasser Heidari @ 11:05

Original Document :

This script will parse a full mysqldump file and extract the necessary portions required to restore a single table. The output is printed to STDOUT, so you’ll want to redirect to a file from the command line, like so: > somefile.sql

# -t mytable -r mydumpfile > mytable.sql
# mysql -utest -ptest mydb < mytable.sql


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: