]> git.phdru.name Git - sqlconvert.git/blob - docs/mysql2sql.rst
Rename mysql2sql -> sqlconvert
[sqlconvert.git] / docs / mysql2sql.rst
1 .. mysql2sql documentation master file, created by
2    sphinx-quickstart on Fri Jul 22 19:32:24 2016.
3    You can adapt this file completely to your liking, but it should at least
4    contain the root `toctree` directive.
5
6 Welcome to mysql2sql's documentation!
7 =====================================
8
9 This is mysql2sql, a mysql to sql converter. It is primary intended to
10 convert mysqldump (especially with extended INSERT syntax) to standard
11 SQL to load at least to PostgreSQL or SQLite.
12
13 The program is in its initial phase and currently cannot do much.
14
15 .. highlight:: none
16
17 Command line
18 ------------
19
20 mysql2sql
21 ~~~~~~~~~
22
23 Usage::
24
25     mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
26
27 Options::
28
29     -e ENCODING, --encoding ENCODING
30                            input/output encoding, default is utf-8
31     -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
32                            separate output encoding, default is the same as
33                            `-e` except for console; for console output charset
34                            from the current locale is used
35     -P, --no-pbar          Inhibit progress bar
36     infile                 Input file, stdin if absent or '-'
37     -o, --outfile outfile  Output file, stdout if absent or '-'
38
39 If stderr is connected to the console the program displays a text mode progress
40 bar. Option `-P/--no-pbar` inhibits it.
41
42 Option `-o` is useful when infile is absent (input is redirected), for
43 example::
44
45     mysql2sql -o outfile.sql < infile.sql
46     cat infile.sql | mysql2sql -o outfile.sql
47
48 But of course it simply can be::
49
50     mysql2sql - outfile.sql < infile.sql
51     cat infile.sql | mysql2sql - outfile.sql