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 the early stage of development and currently cannot do much.
9 It removes /\*! directives \*/, unescapes strings and passes everything else
23 mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
27 -e ENCODING, --encoding ENCODING
28 input/output encoding, default is utf-8
29 -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
30 separate output encoding, default is the same as
31 `-e` except for console; for console output charset
32 from the current locale is used
33 -P, --no-pbar Inhibit progress bar
34 infile Input file, stdin if absent or '-'
35 -o, --outfile outfile Output file, stdout if absent or '-'
37 If stderr is connected to the console the program displays a text mode progress
38 bar. Option `-P/--no-pbar` inhibits it.
40 Option `-o` is useful when infile is absent (input is redirected), for
43 mysql2sql -o outfile.sql < infile.sql
44 cat infile.sql | mysql2sql -o outfile.sql
46 But of course it simply can be::
48 mysql2sql - outfile.sql < infile.sql
49 cat infile.sql | mysql2sql - outfile.sql