Q&A

Q1:Can I import an entire database using mysql batch import, mysqlimport, and LOAD DATA INFILE?
A1: Yes. Any of these methods can be used to process files that create databases, tables, and the data within them. In the simple examples you saw today, we only imported small amounts of data. However, files containing SQL are processed by mysql in batch mode and can be of any size and contain any legal SQL.
Q2:How do I export data from MySQL?
A2: We'll cover methods of extracting data and saving it in a text file in Day 8, “Querying Data,” and Day 15, “Administration.” This includes mysqldump, the counterpart of mysqlimport, and SELECT INTO OUTFILE, the counterpart of LOAD DATA INFILE.

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.