I encountered a situation where I had to extract only a specific table from a huge MySQL dump. Here is how you could accomplish this.
Lets say the name of the table is mytable and the file containing the huge mysql dump is mysql.dump. Here is the command to extract mytable
This will copy into the file mytable.dump what is located between CREATE TABLE mytable and the next CREATE TABLE corresponding to the next table.
If required you can then adjust the file mytable.dump which contains the structure of the table mytable, and the data.
No comments:
Post a Comment