the mysqlimport client provides a command line interface for the load data infileql statement. Most of mysqlimport options correspond directly to the load data infile clause.
options:
-- Host = host_name, -H host_name
import data to the MySQL server on the given host. The default host is localhost.
-- local, -l
Read the input file from the local client.
-- lock-tables, -l
lock all tables before processing text files for writing. This ensures that all tables are synchronized on the server.
-- password [= PASSWORD], -P [Password]
password used to connect to the server. If you use the short option format (-P), there must be no space between the option and password. If there is no password value after the -- password or-P option in the command line, a prompt is displayed for entering a password.
-- Port = port_num, -P port_num
the TCP/IP Port number used for connection.
-- protocol = {tcp | socket | pipe | memory}
connection protocol used.
-- replace, -r
the -- replace and -- ignore options control the processing of input records that have been copied to a unique key value. If -- replace is specified, the new line replaces existing rows with the same unique key value. If -- ignore is specified, the input row that copies the unique key value is skipped. If these two options are not specified, an error occurs when a duplicate key value is found and the remaining part of the text file is ignored.
-- fields-terminated-by =... // field separator
example
shell> mysqlimport -- local test imptest.txt
test. imptest: records: 2 deleted: 0 skipped: 0 Warnings: 0
Original article:
Http://www.lamppr.com/docs/mysql/client-side-scripts.html#mysqlimport