I had a request to export the whole MySQL database except few tables.
I am listing here a way to export the MySQL database and also to ignore selective few tables.
Export MySQL Database Schema
mysqldump -u user-name -h host-name -p --no-data database-name --single-transaction --quick --lock-tables=false > /tmp/db_$(date +%F_%T).sql
Export MySQL Database with Data
mysqldump -u user-name -h host-name -p database-name --single-transaction --quick --lock-tables=false | gzip > /tmp/db_$(date +%F_%T).sql.gz
Export Selective MySQL Database Tables
mysqldump -u user-name -h host-name -p database-name table-name1 table-name2 --single-transaction --quick --lock-tables=false | gzip > /tmp/tables_$(date +%F_%T).sql.gz
Ignore MySQL Database Tables
mysqldump -u user-name -h host-name -p database-name --ignore-table={database-name.table-name1,database-name.table-name2} --single-transaction --quick --lock-tables=false | gzip > /tmp/ignore_tables_$(date +%F_%T).sql.gz
Hope this is helpful