4 This is mysql2sql, a mysql to sql converter. It is primary intended to
5 convert mysqldump (especially with extended INSERT syntax) to standard
6 SQL to load at least to PostgreSQL or SQLite.
8 The program is in its initial phase and currently cannot do much. It only
9 removes /\*! directives \*/ and passes everything else unmodified.
22 mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
26 -e ENCODING, --encoding ENCODING
27 input/output encoding, default is utf-8
28 -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
29 separate output encoding, default is the same as
30 `-e` except for console; for console output charset
31 from the current locale is used
32 -P, --no-pbar Inhibit progress bar
33 infile Input file, stdin if absent or '-'
34 -o, --outfile outfile Output file, stdout if absent or '-'
36 If stderr is connected to the console the program displays a text mode progress
37 bar. Option `-P/--no-pbar` inhibits it.
39 Option `-o` is useful when infile is absent (input is redirected), for
42 mysql2sql -o outfile.sql < infile.sql
43 cat infile.sql | mysql2sql -o outfile.sql
45 But of course it simply can be::
47 mysql2sql - outfile.sql < infile.sql
48 cat infile.sql | mysql2sql - outfile.sql