/usr/bin/mysqlimport Ver 8.0.46-39 for Linux on x86_64 (Source distribution)
Copyright (c) 2009-2026 Percona LLC and/or its affiliates
Copyright (c) 2000, 2026, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Loads tables from text files in various formats. The base name of the
text file must be the name of the table that should be used.
If one uses sockets to connect to the MySQL server, the server will open and
read the text file directly. In other cases the client will open the text
file. The SQL command 'LOAD DATA INFILE' is used to import the rows.
Usage: /usr/bin/mysqlimport [OPTIONS] database textfile...
Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
The following groups are read: mysqlimport client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.
--bind-address=name IP address to bind to.
--character-sets-dir=name
Directory for character set files.
--default-character-set=name
Set the default character set.
-c, --columns=name 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.
-C, --compress Use compression in server/client protocol.
-#, --debug[=#] This is a non-debug version. Catch this and exit.
--debug-check This is a non-debug version. Catch this and exit.
--debug-info This is a non-debug version. Catch this and exit.
--default-auth=name Default authentication client-side plugin to use.
-d, --delete First delete all rows from table.
--enable-cleartext-plugin
Enable/disable the clear text authentication plugin.
--fields-terminated-by=name
Fields in the input file are terminated by the given
string.
--fields-enclosed-by=name
Fields in the import file are enclosed by the given
character.
--fields-optionally-enclosed-by=name
Fields in the input file are optionally enclosed by the
given character.
--fields-escaped-by=name
Fields in the input file are escaped by the given
character.
-f, --force Continue even if we get an SQL error.
-?, --help Displays this help and exits.
-h, --host=name Connect to host.
-i, --ignore If duplicate unique key was found, keep old row.
--ignore-lines=# Ignore first n lines of data infile.
--lines-terminated-by=name
Lines in the input file are terminated by the given
string.
-L, --local Read all files through the client.
-l, --lock-tables Lock all tables for write (this disables threads).
--low-priority Use LOW_PRIORITY when updating the table.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-,, --password1[=name]
Password for first factor authentication plugin.
-,, --password2[=name]
Password for second factor authentication plugin.
-,, --password3[=name]
Password for third factor authentication plugin.
--plugin-dir=name Directory for client-side plugins.
-P, --port=# 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).
--protocol=name The protocol to use for connection (tcp, socket, pipe,
memory).
-r, --replace If duplicate unique key was found, replace old row.
-s, --silent Be more silent.
-S, --socket=name The socket file to use for connection.
--server-public-key-path=name
File path to the server public RSA key in PEM format.
--get-server-public-key
Get server public key
--ssl-mode=name SSL connection mode.
--ssl-ca=name CA file in PEM format.
--ssl-capath=name CA directory.
--ssl-cert=name X509 cert in PEM format.
--ssl-cipher=name SSL cipher to use.
--ssl-key=name X509 key in PEM format.
--ssl-crl=name Certificate revocation list.
--ssl-crlpath=name Certificate revocation list path.
--tls-version=name TLS version to use, permitted values are: TLSv1.2,
TLSv1.3
--ssl-fips-mode=name
SSL FIPS mode (applies only for OpenSSL); permitted
values are: OFF, ON, STRICT
--tls-ciphersuites=name
TLS v1.3 cipher to use.
--ssl-session-data=name
Session data file to use to enable ssl session reuse
--ssl-session-data-continue-on-failed-reuse
If set to ON, this option will allow connection to
succeed even if session data cannot be reused.
--use-threads=# Load files in parallel. The argument is the number of
threads to use for loading data.
-u, --user=name User for login if not current user.
-v, --verbose Print info about the various stages.
-V, --version Output version information and exit.
--compression-algorithms=name
Use compression algorithm in server/client protocol.
Valid values are any combination of
'zstd','zlib','uncompressed'.
--zstd-compression-level=#
Use this compression level in the client/server protocol,
in case --compression-algorithms=zstd. Valid range is
between 1 and 22, inclusive. Default is 3.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
----------------------------------------- --------------------------------
bind-address (No default value)
character-sets-dir (No default value)
default-character-set auto
columns (No default value)
compress FALSE
default-auth (No default value)
delete FALSE
enable-cleartext-plugin FALSE
fields-terminated-by (No default value)
fields-enclosed-by (No default value)
fields-optionally-enclosed-by (No default value)
fields-escaped-by (No default value)
force FALSE
host (No default value)
ignore FALSE
ignore-lines 0
lines-terminated-by (No default value)
local FALSE
lock-tables FALSE
low-priority FALSE
plugin-dir (No default value)
port 0
replace FALSE
silent FALSE
socket (No default value)
server-public-key-path (No default value)
get-server-public-key FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-crl (No default value)
ssl-crlpath (No default value)
tls-version (No default value)
tls-ciphersuites (No default value)
ssl-session-data (No default value)
ssl-session-data-continue-on-failed-reuse FALSE
use-threads 0
user (No default value)
verbose FALSE
compression-algorithms (No default value)
zstd-compression-level 3
Options (58)
| Option | Description | Source |
|---|---|---|
--print-defaults | Print the program argument list and exit. | help |
--no-defaults | Don't read default options from any option file, except for login file. | help |
--defaults-file # | Only read default options from the given file #. | help |
--defaults-group-suffix # | Also read groups with concat(group, suffix) | help |
--login-path # | Read this path from the login file. | help |
--character-sets-dir name | Directory for character set files. | help |
--default-character-set name | Set the default character set. | help |
-c, --columns name | Use only these columns to import the data to. | help |
-C, --compress | Use compression in server/client protocol. | help |
-#, --debug # | This is a non-debug version. | help |
--debug-check | This is a non-debug version. | help |
--debug-info | This is a non-debug version. | help |
-d, --delete | First delete all rows from table. | help |
--enable-cleartext-plugin | Enable/disable the clear text authentication plugin. | help |
--fields-terminated-by name | Fields in the input file are terminated by the given string. | help |
--fields-enclosed-by name | Fields in the import file are enclosed by the given character. | help |
--fields-optionally-enclosed-by name | Fields in the input file are optionally enclosed by the given character. | help |
--fields-escaped-by name | Fields in the input file are escaped by the given character. | help |
-f, --force | Continue even if we get an SQL error. | help |
-?, --help | Displays this help and exits. | help |
-h, --host name | Connect to host. | help |
-i, --ignore | If duplicate unique key was found, keep old row. | help |
--ignore-lines # | Ignore first n lines of data infile. | help |
--lines-terminated-by name | Lines in the input file are terminated by the given string. | help |
-L, --local | Read all files through the client. | help |
-l, --lock-tables | Lock all tables for write (this disables threads). | help |
--low-priority | Use LOW_PRIORITY when updating the table. | help |
-p, --password name | Password to use when connecting to server. | help |
--password1 name | •--password2[=pass_val] The password for multifactor authentication factor 2 of the MySQL account used for connecting to the server. | help + man |
--password2 name | Password for second factor authentication plugin. | help |
--password3 name | Password for third factor authentication plugin. | help |
--plugin-dir name | Directory for client-side plugins. | help |
-P, --port # | 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). | help |
--protocol name | The protocol to use for connection (tcp, socket, pipe, memory). | help |
-r, --replace | If duplicate unique key was found, replace old row. | help |
-s, --silent | Be more silent. | help |
-S, --socket name | The socket file to use for connection. | help |
--server-public-key-path name | File path to the server public RSA key in PEM format. | help |
--get-server-public-key | Get server public key | help |
--ssl-mode name | SSL connection mode. | help |
--ssl-ca name | CA file in PEM format. | help |
--ssl-capath name | CA directory. | help |
--ssl-cert name | X509 cert in PEM format. | help |
--ssl-cipher name | SSL cipher to use. | help |
--ssl-key name | X509 key in PEM format. | help |
--ssl-crl name | Certificate revocation list. | help |
--ssl-crlpath name | Certificate revocation list path. | help |
--tls-version name | TLS version to use, permitted values are: TLSv1.2, TLSv1.3 | help |
--ssl-fips-mode name | SSL FIPS mode (applies only for OpenSSL); | help |
--tls-ciphersuites name | TLS v1.3 cipher to use. | help |
--ssl-session-data name | Session data file to use to enable ssl session reuse | help |
--ssl-session-data-continue-on-failed-reuse | If set to ON, this option will allow connection to succeed even if session data cannot be reused. | help |
--use-threads # | Load files in parallel. | help |
-u, --user name | User for login if not current user. | help |
-v, --verbose | Print info about the various stages. | help |
-V, --version | Output version information and exit. | help |
--compression-algorithms name | Use compression algorithm in server/client protocol. | help |
--zstd-compression-level # | Use this compression level in the client/server protocol, in case --compression-algorithms=zstd. | help |