mysqlimport - Loading Data from Files

This section provides some tutorial examples on how to use mysqlimport tool to load data of to tables on a MySQL server from data files.

What Is mysqlimport? mysqlimport is a tool to load data stored in files into tables. Data should be stored in files as tab delimited values. Data file names without extensions should match table names. The command line syntax of mysqlimport is:

C:\herong>set "MySQL=\Program Files\MySQL\MySQL Server 5.7"
C:\herong>%MySQL%\bin\mysqlimport db_name file_1, file_2, ...

For example, I used the following command to load data back into the book table. Remember the data was dumped earlier by the mysqldump command with the --tab option.

C:\herong>%MySQL%\bin\mysqlimport Library Library\book.txt Records: 3  Deleted: 0  Skipped: 0  Warnings: 0

Last update: 2015.

Table of Contents

 About This Book

 Introduction of SQL

 MySQL Introduction and Installation

Introduction of MySQL Programs

 List of MySQL Programs

 mysqld - The MySQL Server Program

 mysqladmin - The Client Tool for Administrators

 mysql - The Client Tool for End Users

 Using mysql to Run SQL Statements

 mysqldump - Dumping Data to Files

mysqlimport - Loading Data from Files

 Perl Programs and MySQL Servers

 PHP Programs and MySQL Servers

 Java Programs and MySQL Servers

 Datatypes and Data Literals

 Operations and Expressions

 Character Strings and Bit Strings

 Commonly Used Functions

 Table Column Types for Different Types of Values

 Using DDL to Create Tables and Indexes

 Using DML to Insert, Update and Delete Records

 Using SELECT to Query Database

 Transaction Management and Isolation Levels

 Locks Used in MySQL

 Defining and Calling Stored Procedures

 Variables, Loops and Cursors Used in Stored Procedures

 Outdated Tutorials


 PDF Printing Version