Backup and Restore a single table using mysqldump
Backup a single table from a databasemysqldump -u -p database_one table_name1 table_name2 table_name3 > /var/www/backups/table_name.sql
Restore the table into another database
mysql -u -p database_two < /var/www/backups/table_name.sqlYou can dump a query as csv like this:
SELECT * from myTable
INTO OUTFILE '/tmp/querydump.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
Không có nhận xét nào:
Đăng nhận xét