I’d like to avoid mysqldump since that outputs in a form that is only convenient for mysql to read. CSV seems more universal (one file per table is fine). But if there are advantages to mysqldump, I’m all ears. Also, I’d like something I can run from the command line (linux). If that’s a mysql script, pointers to how to make such a thing would be helpful.
Share
If you can cope with table-at-a-time, and your data is not binary, use the
-Boption to themysqlcommand. With this option it’ll generate TSV (tab separated) files which can import into Excel, etc, quite easily:Alternatively, if you’ve got direct access to the server’s file system, use
SELECT INTO OUTFILEwhich can generate real CSV files: