List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:December 10 2000 10:03pm
Subject:Re: Dumping table to CSV file
View as plain text  
At 6:38 PM -0200 12/10/00, Nando2 wrote:
>Paul,
>
>Thanks. I have tried these three varintions and it didn't work :
>
>1) mysqldump -h localhost -u root -ppassword --tab-fields-terminated-by=;
>db_parts tbl_id > tbl_id.csv
>2) mysqldump -h localhost -u root -ppassword --tab--fields-terminated-by=;
>db_parts tbl_id > tbl_id.csv
>1) mysqldump -h localhost -u root -ppassword --tab=-fields-terminated-by=;
>db_parts tbl_id > tbl_id.csv

--tab must name the directory where you want the data files to be written,
for example, --tab=/var/tmp
It's not part of the --fields-terminated-by argument.

You'll probably also have a problem using ; as the termination character
unless you quote it, because the shell interprets ; as a command separator
and will eat it before mysqldump even starts up.  Try something like this:

mysqldump -h localhost -u root -ppassword --tab=/var/tmp
--fields-terminated-by=";" db_parts tbl_id > tbl_id.csv


Thanks for the comments on the book, by the way.

-- 
Paul DuBois, paul@stripped
Thread
Dumping table to CSV fileNando210 Dec
  • Re: Dumping table to CSV filePaul DuBois10 Dec
  • Re: Dumping table to CSV fileNando210 Dec
    • RE: Dumping table to CSV fileSales-DataTrak Business Solutions10 Dec
      • Re: Dumping table to CSV fileCarlos Fernando Scheidecker Antunes10 Dec
    • Re: Dumping table to CSV filePaul DuBois10 Dec
RE: Dumping table to CSV fileQuentin Bennett10 Dec
  • Re: Dumping table to CSV fileNando210 Dec
  • Re: Dumping table to CSV fileNando210 Dec
RE: Dumping table to CSV fileQuentin Bennett10 Dec
  • Re: Dumping table to CSV fileNando210 Dec