Tersefied by Dennis German.
Original is located at dev.MySQL.Com
8.15. mysqlimport A Data Import Program
command-line interface to the LOAD DATA INFILE
shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
Strips any extension from textfile for the name of the table.
-u user_name, --user=user_name,
-h host_name, --host=host_name, default localhost
.
-D --delete rows from the table before import (warning large existing tables should be TRUNCATED )
--columns=column_list, -c column_list comma-separated, ordered, list of column names .
--fields-terminated-by=...,
--fields-enclosed-by=...,
--fields-optionally-enclosed-by=...,
--fields-escaped-by=...
--ignore-lines=N Ignore the first N lines of the data file.
-L --local Read input files locally from the client host. cautions:
MySQL Enterprise
-C --compress Compress information between the client and the server
-f --force Ignore errors.
--character-sets-dir=path Character Set
--default-character-set=charset_name Character Set Used for Data and Sorting
-i, -r, --ignore, --replace rows that duplicate existing rows on unique key values are ignored(skipped) or replaced. Default action is to cause an error
--debug[=debug_options], -# [debug_options] ' d:t:o,file_name'.
-s --silent display errors only.
-v --verbose
-V --version
--help, -?
> mysqlimport --help mysqlimport Ver 3.5 Distrib 4.1.21, for pc-linux-gnu (i686) Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license 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: mysqlimport [OPTIONS] database textfile... Default options are read from the following files in the given order: /etc/my.cnf /var/lib/mysql/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 options file --defaults-file=# Only read default options from the given file # --defaults-extra-file=# Read this file after the global files are read --character-sets-dir=name Directory where character sets are. --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'. -d, --delete First delete all rows from table. --fields-terminated-by=name Fields in the textfile are terminated by ... --fields-enclosed-by=name Fields in the importfile are enclosed by ... --fields-optionally-enclosed-by=name Fields in the i.file are opt. enclosed by ... --fields-escaped-by=name Fields in the i.file are escaped by ... -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 i.file are terminated by ... -L, --local Read all files through the client. -l, --lock-tables Lock all tables for write. --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. -P, --port=# Port number to use for connection. --protocol=name The protocol of connection (tcp,socket,pipe,memory). -r, --replace If duplicate unique key was found, replace old row. -s, --silent Be more silent. -S, --socket=name Socket file to use for connection. -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 in bold are considered important by this author Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) --------------------------------- ----------------------------- character-sets-dir (No default value) default-character-set latin1 columns (No default value) compress FALSE 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-lines 0 lines-terminated-by (No default value) local FALSE lock-tables FALSE low-priority FALSE port 3306 replace FALSE silent FALSE socket (No default value) user (No default value) verbose FALSE |