|
1 | 1 | Usage
|
2 | 2 | -----
|
3 | 3 |
|
4 |
| -Transfer SQLite to MySQL using the provided CLI options. |
| 4 | +The command line options for the ``sqlite3mysql`` tool are as follows: |
| 5 | + |
| 6 | +.. code-block:: bash |
| 7 | +
|
| 8 | + sqlite3mysql [OPTIONS] |
5 | 9 |
|
6 | 10 | Options
|
7 | 11 | ^^^^^^^
|
8 | 12 |
|
9 |
| -SQLite Options |
10 |
| -~~~~~~~~~~~~~~ |
| 13 | +Required Options |
| 14 | +"""""""""""""""" |
11 | 15 |
|
12 | 16 | - ``-f, --sqlite-file PATH``: SQLite3 database file [required]
|
| 17 | +- ``-d, --mysql-database TEXT``: MySQL database name [required] |
| 18 | +- ``-u, --mysql-user TEXT``: MySQL user [required] |
| 19 | + |
| 20 | +Password Options |
| 21 | +"""""""""""""""" |
| 22 | + |
| 23 | +- ``-p, --prompt-mysql-password``: Prompt for MySQL password |
| 24 | +- ``--mysql-password TEXT``: MySQL password |
| 25 | + |
| 26 | +Table Options |
| 27 | +"""""""""""""" |
| 28 | + |
13 | 29 | - ``-t, --sqlite-tables TUPLE``: Transfer only these specific tables (space separated table names). Implies ``--without-foreign-keys`` which inhibits the transfer of foreign keys.
|
14 | 30 | - ``-X, --without-foreign-keys``: Do not transfer foreign keys.
|
15 | 31 | - ``-W, --ignore-duplicate-keys``: Ignore duplicate keys. The default behavior is to create new ones with a numerical suffix, e.g. 'existing_key' -> 'existing_key_1'
|
| 32 | +- ``-E, --mysql-truncate-tables``: Truncates existing tables before inserting data. |
16 | 33 |
|
17 |
| -MySQL Options |
18 |
| -~~~~~~~~~~~~~ |
| 34 | +Transfer Options |
| 35 | +"""""""""""""""" |
| 36 | + |
| 37 | +- ``-i, --mysql-insert-method [UPDATE|IGNORE|DEFAULT]``: MySQL insert method. DEFAULT will throw errors when encountering duplicate records; UPDATE will update existing rows; IGNORE will ignore insert errors. Defaults to IGNORE. |
| 38 | +- ``--with-rowid``: Transfer rowid columns. |
| 39 | +- ``-c, --chunk INTEGER``: Chunk reading/writing SQL records |
| 40 | + |
| 41 | +Connection Options |
| 42 | +"""""""""""""""""" |
19 | 43 |
|
20 |
| -- ``-d, --mysql-database TEXT``: MySQL database name [required] |
21 |
| -- ``-u, --mysql-user TEXT``: MySQL user [required] |
22 |
| -- ``-p, --prompt-mysql-password``: Prompt for MySQL password |
23 |
| -- ``--mysql-password TEXT``: MySQL password |
24 | 44 | - ``-h, --mysql-host TEXT``: MySQL host. Defaults to localhost.
|
25 | 45 | - ``-P, --mysql-port INTEGER``: MySQL port. Defaults to 3306.
|
26 | 46 | - ``-S, --skip-ssl``: Disable MySQL connection encryption.
|
27 |
| -- ``-i, --mysql-insert-method [UPDATE|IGNORE|DEFAULT]``: MySQL insert method. DEFAULT will throw errors when encountering duplicate records; UPDATE will update existing rows; IGNORE will ignore insert errors. Defaults to IGNORE. |
28 |
| -- ``-E, --mysql-truncate-tables``: Truncates existing tables before inserting data. |
29 |
| -- ``--mysql-integer-type TEXT``: MySQL default integer field type. Defaults to INT(11). |
30 |
| -- ``--mysql-string-type TEXT``: MySQL default string field type. Defaults to VARCHAR(255). |
31 |
| -- ``--mysql-text-type [MEDIUMTEXT|TEXT|TINYTEXT|LONGTEXT]``: MySQL default text field type. Defaults to TEXT. |
32 |
| -- ``--mysql-charset TEXT``: MySQL database and table character set [default: utf8mb4] |
33 |
| -- ``--mysql-collation TEXT``: MySQL database and table collation |
34 | 47 |
|
35 | 48 | Other Options
|
36 |
| -~~~~~~~~~~~~~ |
| 49 | +"""""""""""""" |
37 | 50 |
|
38 | 51 | - ``-T, --use-fulltext``: Use FULLTEXT indexes on TEXT columns. Will throw an error if your MySQL version does not support InnoDB FULLTEXT indexes!
|
39 |
| -- ``--with-rowid``: Transfer rowid columns. |
40 |
| -- ``-c, --chunk INTEGER``: Chunk reading/writing SQL records |
41 | 52 | - ``-l, --log-file PATH``: Log file
|
42 | 53 | - ``-q, --quiet``: Quiet. Display only errors.
|
43 | 54 | - ``--debug``: Debug mode. Will throw exceptions.
|
|
0 commit comments