I needed to take the backup and restore the selected table(s) of mysql database. And I found Gaurav Chauhan’s blog on taking dump of the database and to restore the database. So I tried with the same commands but with table names passed as parameters and that worked.
mysqldump -u root -p my_database Table1 Table2 > /home/amit/tablesDump.sql;
And the file the dump of Table1 and Table2 got created at /home/amit/tablesDump.sql.
To restore the table(s) back, we used the following command
mysql -u root -p my_database_2 //First we need to login to mysql mysql> source /home/amit/tablesDump.sql;
Both tables were created in my_database_2.
Hope this helped.