-- export all tables structure and data
mysqldump -uroot -p db-name > /path/to/dump.sql
-- export all tables structure and data, reset AUTO_INCREMENT
mysqldump -uroot -p db-name | sed 's/ AUTO_INCREMENT=[0-9]*//' > /path/to/dump.sql
-- export table structure and data
mysqldump -uroot -p db-name table-name1 table-name2 > /path/to/dump.sql
-- export structure only
mysqldump -d -uroot -p db-name table-name1 table-name2 > /path/to/dump.sql
-- export structure only (reset AUTO_INCREMENT)
mysqldump -d -uroot -p db-name table-name1 table-name2 | sed 's/ AUTO_INCREMENT=[0-9]*//' > /path/to/dump.sql
-- override all data
mysql -upropertySql -p property < /path/to/dump.sql
-- Save MySQL query results into a text or CSV file
SELECT order_id,product_name,qty FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '
'