dole doug dole doug - 1 year ago 116
MySQL Question

mysql dump tables only

In my database I have some tables and views.
How can I export all the tables (and not the views) from my database from command line?

Answer Source

You can use mysqldump with the option --ignore-table to exclude the views individually. Or use mysqldump and remove the views with an application/manually. grep might be an option:

grep -v "CREATE VIEW" db.dump > db-without-views.dump
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download