- 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
mysqlimport - A MySQL Data Import Program
The mysqlimport client comes with a command-line interface that helps with the LOAD DATA SQL statement. Most options to mysqlimport respond directly to clauses of LOAD DATA syntax
The utility mysqlimport can be invoked as shown below −
shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
For every text file that is named on the command line, mysqlimport strips any extension from the file name and uses the result to figure out the name of the table into which the file's contents have to be imported.
Let us take an example: Files named sample.txt, sample.text, and sample all would be imported into a table named sample.
This utlity supports the following options, which can be specified on the command line or in the [mysqlimport] and [client] groups of an option file.
If the computer has multiple network interfaces, this option can be used to select which interface needs to be used to connect to the MySQL server.
It is the directory where character sets are installed.
--columns=column_list, -c column_list
It takes a list of comma-separated column names as its value. The order of the column names indicate how data file columns have to be matched with the table columns.
It compresses all information sent between the client and the server if possible.
It refers to the permitted compression algorithms for connections to the server. The available algorithms are the same as that for the protocol_compression_algorithms system variable. The default value is uncompressed.
It enables the mysql_clear_password cleartext authentication plugin.
This option ignores the errors. Let us take an example: If a table for a text file does not exist, continue processing the remaining files. Without --force, mysqlimport exits if a table does not exist.
- How can we import CSV files into MySQL tables by using mysqlimport?
- How can we upload data into MySQL tables by using mysqlimport?
- How can we upload data into multiple MySQL tables by using mysqlimport?
- How can we import data from .txt file into MySQL table?
- How can we import data from .CSV file into MySQL table?
- What are some frequently used mysqlimport options while uploading the data into MySQL table through command line?
- How can we MySQL LOAD DATA INFILE statement with ‘ENCLOSED BY’ option to import data from text file into MySQL table?
- Import a module in Python
- How can we import the text file, having data on the same line with a separator, into MySQL table?
- How can we MySQL LOAD DATA INFILE statement with ‘FIELDS TERMINATED BY’ option to import data from text file into MySQL table?
- How to import csv file data from Github in R?
- Difference between import tkinter as tk and from tkinter import
- Do I need to import the Java.lang package anytime during running a program?
- Add data to existing data in a MySQL Database?