- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
|-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 \n (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.|
- Using Options on the Command Line for MySQL programs?
- MySQL Command-Line Options that Affect Option-File Handling
- Python Parser for command line options
- Set options while creating a MySQL table. Display the same options as well
- How can we transfer information between MySQL and data files through command line?
- How can we import the text file, having some line prefixes, into MySQL table?
- How can we upload data into MySQL tables by using mysqlimport?
- Frequently Used Examples of ‘Fuser’ Command in Linux
- mysqlimport - A MySQL Data Import Program
- What are the different MySQL prompts we have on the command line?
- The MySQL Command-Line Client
- Insert the data into Table C IF The data is not in Table B while Comparing to Table A in MySQL?
- How can we upload data into multiple MySQL tables by using mysqlimport?
- Command Options for Connecting to the MySQL Server
- Connecting to the MySQL Server Using Command Options