Backing Up Views with Mysql Dump
问题 I want to back up only the Views with mysqldump. Is this possible? If so, how? 回答1: NOTE: This answer from Ken moved from suggested edit to own answer. here's a full command line example using a variant of the above mysql -u username INFORMATION_SCHEMA --skip-column-names --batch -e "select table_name from tables where table_type = 'VIEW' and table_schema = 'database'" | xargs mysqldump -u username database > views.sql This extracts all of the view names via a query to the INFORMATION_SCHEMA