When DBA take backup of full database table and if developer need any one table to restore at that time need to take below action to restore single table in existing database.
Step 1 : gunzip the backup of mysql database through linux command
gunzip -f DATABASENAME.sql.gz
Step 2 : Get the location of backup file and execute below command to extract the sql of table
./extract_sql.pl -t TABLENAME -r /PATH/BACKUPFILENAME.sql > /PATH/RESTOREFILENAME.sql
Step 3 : Import sql file which is got from extracted sql file using above command
mysql -u USERNAME-p PASSWORD TABLENAME< /PATH/RESTOREFILENAME.sql
or
mysql -u USERNAME-p -P PORT -h HOSTIPADDRESS -D DATABASENAME < /PATH/RESTOREFILENAME.sql
or
mysql> use DATABASENAME;
mysql> source RESTOREFILENAME.sql;