Is there any way to exclude views from mysql dump export?
I tried --ignore-table command. But this command recommand the parameters of table which i want to exclude.
I have 30 views in my database.
Is there any simple way to export only table (not views)?
Thanks
Based on the answer here, you should be able to pipe the table objects to mysqldump like:
mysql -u username INFORMATION_SCHEMA
--skip-column-names --batch
-e "select table_name from tables where table_type = 'BASE TABLE'
and table_schema = 'database'"
| xargs mysqldump -u username database
> tables.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With