
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
What are some frequently used mysqlimport options while uploading the data into MySQL table through command line?
mysqlimport can be run with a number of options. Followings are some options for mysqlimport and their effect on import.
Option | Action |
-r or –replace | Cause imported rows to overwrite existing rows if they have the same unique key value. |
-i or –ignore | Ignore rows that have the same unique key value as existing rows. |
-f or –force | Force mysqlimport to continue inserting data even if errors are encountered. |
-l or --lock-tables | Lock each table before importing (a good option on a busy server). |
-d or –delete | Empty the table before inserting. |
--fields-terminated- by='char' | Specify the separator used between values of the same row, default \t (tab). |
--fields-enclosed- by='char' | Specify the delimiter that encloses each field; default is none. |
--fields-optionally- enclosed-by='char' | Same as --fields-enclosed-by, but delimiter is used only to enclose string-type columns; default is none. |
--fields-escaped- by='char' | Specify the escape character placed before special characters; default is \ (backslash, which if specified would be '\'). |
--lines-terminated-by='char' | Specify the separator used to terminate each row of data; default is (newline). |
-u or –user | Specify your username; default is Unix login name. |
-p or –password | Specify your password. |
-h or –host | Import into MySQL on the named host; default is localhost. |
-s or –silent | Silent mode; output appears only when errors occur. |
-v or –verbose | Verbose mode, print more commentary. |
-L or local | Name a local file on the client. |
-V or –version | Print program version information and exit. |
-? or –help | Print help message and exit. |
- Related Articles
- Using Options on the Command Line for MySQL programs?
- MySQL Command-Line Options that Affect Option-File Handling
- Set options while creating a MySQL table. Display the same options as well
- How can we upload data into MySQL tables by using mysqlimport?
- How can we transfer information between MySQL and data files through command line?
- Frequently Used Examples of ‘Fuser’ Command in Linux
- Python Parser for command line options
- How can we upload data into multiple MySQL tables by using mysqlimport?
- mysqlimport - A MySQL Data Import Program
- How can we import the text file, having some line prefixes, into MySQL table?
- Insert the data into Table C IF The data is not in Table B while Comparing to Table A in MySQL?
- What are the different MySQL prompts we have on the command line?
- Select some data from a database table and insert into another table in the same database with MySQL
- Command Options for Connecting to the MySQL Server
- Connecting to the MySQL Server Using Command Options

Advertisements