How to restore a MySQL table from backup.

First uncompress the .zip or .gz backed up sql table.


unzip table1.zip

OR

gzip -d table1.sql.gz

Restoring from backup file need not include table name:

mysql -u -p mydatabase < table1.sql

To create a backup of a table from MySQL:

Taking backup:

mysqldump -u -p mydatabase table1 > table1.sql