Re: mysql dump to cvs file
Posted: 2017/09/18 11:12:41
About this I know, but don't know how to include all tables into file I tried with this line but not working. Database is called wcmTrevorH wrote:The important bit about the SELECT statement given isThat tells it to a) write to the file mentioned and b) write it in CSV format. The rest of the select is up to you and uses the same syntax as any other select.Code: Select all
INTO OUTFILE '/var/lib/mysql-files/orders.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';' "
Code: Select all
mysql -u root -ppass -e "wcm INTO OUTFILE '/var/lib/mysql-files/orders.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';' "