mysqlimport provides a command line interface to the LOAD DATA
INFILE SQL statement. Most options to mysqlimport correspond
directly to the same options to LOAD DATA INFILE.
LOAD DATA.
mysqlimport is invoked like this:@:
shell> mysqlimport [options] filename ...
For each text file named on the command line,
mysqlimport strips any extension from the filename and uses the result
to determine which table to import the file's contents into. For example,
files named `patient.txt', `patient.text' and `patient' would
all be imported into a table named patient.
mysqlimport supports the following options:@:
-C, --compress
-#, --debug[=option_string]
-d, --delete
--fields-terminated-by=...
--fields-enclosed-by=...
--fields-optionally-enclosed-by=...
--fields-escaped-by=...
--fields-terminated-by=...
LOAD DATA INFILE. LOAD DATA.
-f, --force
--force,
mysqlimport exits if a table doesn't exist.
--help
-h host_name, --host=host_name
localhost.
-i, --ignore
--replace option.
-l, --lock-tables
-L, --local
localhost (which is the default host).
-pyour_pass, --password[=your_pass]
mysqlimport solicits the password from the terminal.
-P port_num, --port=port_num
localhost, for which Unix sockets are
used.)
-r, --replace
--replace and --ignore options control handling of input
records that duplicate existing records on unique key values. If you specify
--replace, new rows replace existing rows that have the same unique key
value. If you specify --ignore, input rows that duplicate an existing
row on a unique key value are skipped. If you don't specify either option, an
error occurs when a duplicate key value is found, and the rest of the text
file is ignored.
-s, --silent
-S /path/to/socket, --socket=/path/to/socket
localhost (which is the
default host).
-u user_name, --user=user_name
-v, --verbose
-V, --version