Options for mariadb-import & mysqlimport in 10.5 ES

The mariadb-import utility is the newer name for mysqlimport, though you can still run it using either name.

Option

Description

--character-sets-dir

Directory for character set files.

--columns (-c)

Use only these columns to import the data to. Give the column names in a comma separated list. This is same as giving columns to LOAD DATA INFILE.

--compress (-C)

Use compression in server/client protocol.

--debug (-#)

Output debug log. Often this is 'd:t:o,filename'.

--debug-check

Check memory and open file usage at exit.

--debug-info

Print some debug info at exit.

--default-auth

Default authentication client-side plugin to use.

--default-character-set

Set the default character set.

--defaults-extra-file

Read this file after the global files are read.

--defaults-file

Only read default options from the given file #.

--defaults-group-suffix

Additionally read default groups with # appended as a suffix.

--delete (-d)

First delete all rows from table.

--fields-enclosed-by

Fields in the import file are enclosed by the given character.

--fields-escaped-by

Fields in the input file are escaped by the given character.

--fields-optionally-enclosed-by

Fields in the input file are optionally enclosed by the given character.

--fields-terminated-by

Fields in the input file are terminated by the given string.

--force (-f)

Continue even if we get an SQL error.

--help (-?)

Displays this help and exits.

--host (-h)

Connect to host.

--ignore (-i)

If duplicate unique key was found, keep old row.

--ignore-foreign-keys (-k)

Disable foreign key checks while importing the data.

--ignore-lines

Ignore first n lines of data infile.

--lines-terminated-by

Lines in the input file are terminated by the given string.

--local (-L)

Read all files through the client.

--lock-tables (-l)

Lock all tables for write (this disables threads).

--low-priority

Use LOW_PRIORITY when updating the table.

--no-defaults

Don't read default options from any option file.

--password (-p)

Password to use when connecting to server. If password is not given it's asked from the tty.

--plugin-dir

Directory for client-side plugins.

--port (-P)

Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).

--print-defaults

Print the program argument list and exit.

--protocol

The protocol to use for connection (tcp, socket, pipe).

--replace (-r)

If duplicate unique key was found, replace old row.

--silent (-s)

Be more silent.

--socket (-S)

The socket file to use for connection.

--ssl

Enable SSL for connection (automatically enabled with other flags).

--ssl-ca

CA file in PEM format (check OpenSSL docs, implies --ssl).

--ssl-capath

CA directory (check OpenSSL docs, implies --ssl).

--ssl-cert

X509 cert in PEM format (implies --ssl).

--ssl-cipher

SSL cipher to use (implies --ssl).

--ssl-crl

Certificate revocation list (implies --ssl).

--ssl-crlpath

Certificate revocation list path (implies --ssl).

--ssl-key

X509 key in PEM format (implies --ssl).

--ssl-verify-server-cert

Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.

--tls-version

TLS protocol version for secure connection.

--use-threads

Load files in parallel. The argument is the number of threads to use for loading data.

--user (-u)

User for login if not current user.

--verbose (-v)

Print info about the various stages.

--version (-V)

Output version information and exit.