
As a web developer, we sometimes may want to export a specific table from a MySQL database. It can be particularly helpful when we are going to apply some changes to a table that is part of a large database and we are interested in backing up that specific table only, rather that whole huge database.
To create a backup (also called dump) of the a table use this command:
mysqldump -u username -p db_name table_name | gzip > db_name.table_name.sql.gzThis will create the backup/dump for the table in the file in compressed format.