📅  最后修改于: 2023-12-03 15:33:04.350000             🧑  作者: Mango
mysqlimport is a command-line tool in MySQL that allows programmers to import CSV and TSV files into MySQL databases. This tool simplifies data loading into the MySQL database and can be used with minimal coding effort.
mysqlimport [OPTIONS] database textfile ...
Following are commonly used options for mysqlimport:
mysqlimport --fields-terminated-by=, --local -u root -p mydb /path/to/data/file.csv
This command imports data from a CSV file located at /path/to/data/file.csv into a table within the MySQL database "mydb".
mysqlimport --fields-terminated-by=' ' --local -u root -p mydb /path/to/data/file.tsv
This command imports data from a TSV file located at /path/to/data/file.tsv into a table within the MySQL database "mydb".
mysqlimport is an essential tool for developers who need to populate databases with data from CSV and TSV files. It provides a simple and efficient way to load data into MySQL databases with minimal coding effort.