View Single Post
  #2 (permalink)  
Old 04-25-2008, 03:41 PM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default

3) --delete, -D

Used to indicate that all rows currently in the table should be deleted before proceeding with the data import.

4) --fields-terminated-by=..., --fields-enclosed-by=..., --fields-optionally-enclosed-by=...,
--fields-escaped-by=..., --lines-terminated-by=...


Group of related options used to indicate character used to terminate file data field, enclose file data field, optionally enclose file data field, escape character in file data field, terminate file data line respectively.

5) --force, -f

Ignore errors, if any occurs. For example, if a corresponding table doesn't exist for a textfile then mysqlimport will stop execution immediately if -f , --force option is not given. If this option is given, mysqlimport will continue to processing other files.

6) --ignore-lines=N

This option is used to specify that first N lines of the data file should be ignored. Useful when the first few linesin the data file is used for labeling and describing data fields.

7) --local, -L

Used to indicate that the input file should be read from client machine.

8) --lock-tables, -l

This option when used makes mysqlimport lock all tables for writing before processing any text files.


Here's a sample mysqlimport command used for import data into sample-tabl command :

Quote:
mysqlimport -u sample-user -p -h mysql.example.com sample-db sample-table.txt
Reply With Quote