资 源 简 介
Dump a mysql database to CSV files, one file per table.
Optionally, print header lines with column names and/or data types from the mysql db.
Written in perl, requires the following perl modules:
Getopt::Long
DBI and DBD::mysql
Text::CSV
mysqldump can sort of do this, by specifying something like:
mysqldump -t -T/some/directory --fields-enclosed-by=" --fields-terminated by=, dbname
This solution doesn"t work very well, however. In particular, it does not really form proper CSV; it does not properly escape the quotes or commas.
mysqldump also requires the user to have FILE privilege on the server, as well as login access to the server; this program doesn"t.