Restoring a Single Table from a Large MySQL Dump Here is a method for restoring a single mysql table from a huge mysqldump [Discuss (1) | Link to this hack]
Comments on this hack
Showing messages 1 through 1 of 1.
Restoring a single table
2003-12-18 12:18:15
anonymous2
[View]
Take a backup of the table which your looking to restore using mysqldump.
mysqldump -u<username> -p<password> <databasename> <tablename> > <path and name of the file>
mysqldump -u<username> -p<password> <databasename> <tablename> > <path and name of the file>
ex:mysqldump -usridhar -pthajes testdb usermas > /home/sridhar/mysqldump/tablebackup.txt
where we get only usermas table backup.
for restoring to another db. use
mysql <dbname> < /home/sridhar/mysqldump/tablebackup.txt
ex: mysql restDB < /home/sridhar/mysqldump/tablebackup.txt .
Note: If restDB has already usermas table, pls drop before restoring.
:) Njoy...
If any clarifications pls feel free to contact me @ Sridhar@thajes.com