OS Manuals

/usr/bin/mysqlimport

The MariaDB open source relational database

From mariadb-11.2 11.2.5-r0 (enterprise-packages), captured 2026-11-08 by running mysqlimport --help (exit 0). permalink

/usr/bin/mysqlimport: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-import' instead
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
Copyright 2008-2011 Oracle and Monty Program Ab.
Copyright 2012-2019 MariaDB Corporation Ab.
/usr/bin/mysqlimport from 11.2.5-MariaDB, client 3.7 for Linux (x86_64)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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 MariaDB 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/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqlimport mariadb-import client client-server client-mariadb
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.
The following specify which files/extra groups are read (specified before remaining options):
--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=# Additionally read default groups with # appended as a suffix.

  --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[=name]  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=name Default authentication client-side plugin to use.
  -d, --delete        First delete all rows from table.
  --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.
  -k, --ignore-foreign-keys
                      Disable foreign key checks while importing the data.
  --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.
  --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).
  -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.
  --ssl               Enable SSL for connection (automatically enabled with
                      other flags).
                      (Defaults to on; use --skip-ssl to disable.)
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
                      --ssl).
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).
  --ssl-cipher=name   SSL cipher to use (implies --ssl).
  --ssl-key=name      X509 key in PEM format (implies --ssl).
  --ssl-crl=name      Certificate revocation list (implies --ssl).
  --ssl-crlpath=name  Certificate revocation list path (implies --ssl).
  --tls-version=name  TLS protocol version for secure connection.
  --ssl-verify-server-cert
                      Verify server's "Common Name" in its cert against
                      hostname used when connecting. This option is disabled by
                      default.
  --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.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
character-sets-dir                (No default value)
default-character-set             auto
columns                           (No default value)
compress                          FALSE
debug-check                       FALSE
debug-info                        FALSE
default-auth                      (No default value)
delete                            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-foreign-keys               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)
ssl                               TRUE
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)
ssl-verify-server-cert            FALSE
use-threads                       0
user                              (No default value)
verbose                           FALSE
Options (47)
OptionDescriptionSource
--print-defaultsPrint the program argument list and exit.help
--no-defaultsDon't read default options from any option file.help
--defaults-file #Only read default options from the given file #.help
--defaults-extra-file #Read this file after the global files are read.help
--character-sets-dir nameDirectory for character set files.help
--default-character-set nameSet the default character set.help
-c, --columns nameUse only these columns to import the data to.help
-C, --compressUse compression in server/client protocol.help
-#, --debug nameOutput debug log.help
--debug-checkCheck memory and open file usage at exit.help
--debug-infoPrint some debug info at exit.help
-d, --deleteFirst delete all rows from table.help
--fields-terminated-by nameFields in the input file are terminated by the given string.help
--fields-enclosed-by nameFields in the import file are enclosed by the given character.help
--fields-optionally-enclosed-by nameFields in the input file are optionally enclosed by the given character.help
--fields-escaped-by nameFields in the input file are escaped by the given character.help
-f, --forceContinue even if we get an SQL error.help
-?, --helpDisplays this help and exits.help
-h, --host nameConnect to host.help
-i, --ignoreIf duplicate unique key was found, keep old row.help
-k, --ignore-foreign-keysDisable foreign key checks while importing the data.help
--ignore-lines #Ignore first n lines of data infile.help
--lines-terminated-by nameLines in the input file are terminated by the given string.help
-L, --localRead all files through the client.help
-l, --lock-tablesLock all tables for write (this disables threads).help
--low-priorityUse LOW_PRIORITY when updating the table.help
-p, --password namePassword to use when connecting to server.help
--plugin-dir nameDirectory 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 nameThe protocol to use for connection (tcp, socket, pipe).help
-r, --replaceIf duplicate unique key was found, replace old row.help
-s, --silentBe more silent.help
-S, --socket nameThe socket file to use for connection.help
--sslEnable SSL for connection (automatically enabled with other flags).help
--ssl-ca nameCA file in PEM format (check OpenSSL docs, implieshelp
--ssl-capath nameCA directory (check OpenSSL docs, implies --ssl).help
--ssl-cert nameX509 cert in PEM format (implies --ssl).help
--ssl-cipher nameSSL cipher to use (implies --ssl).help
--ssl-key nameX509 key in PEM format (implies --ssl).help
--ssl-crl nameCertificate revocation list (implies --ssl).help
--ssl-crlpath nameCertificate revocation list path (implies --ssl).help
--tls-version nameTLS protocol version for secure connection.help
--ssl-verify-server-certVerify server's "Common Name" in its cert against hostname used when connecting.help
--use-threads #Load files in parallel.help
-u, --user nameUser for login if not current user.help
-v, --verbosePrint info about the various stages.help
-V, --versionOutput version information and exit.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.