The usual command to take a dump for a single table is
mysqldump -u root -p dbname tablename > filename.sql
But what about table names that have white spaces in between like Order Master? While this kind of naming should be avoided but nevertheless they are perfectly valid. These kind of names are often enclosed within backticks(``
) to make it work in sql statements. But this does not work with mysqldump. To make it work we have to enclose the table name within double quotes (""
). So the correct syntax is:
mysqldump -u username -p dbname "table name" > filename.sql