LOAD DATA Statement The  LOAD DATA  statement reads rows from a text file into a table at a very high speed. The file can be read from the server host or the client host, depending on whether the  LOCAL  modifier is given.  LOCAL  also affects data interpretation and error handling. LOAD DATA  is the complement of  SELECT ... INTO OUTFILE . (See Section 13.2.10.1, “SELECT ... INTO Statement” .) To write data from a table to a file, use  SELECT ... INTO OUTFILE . To read the file back into a table, use  LOAD DATA . The syntax of the  FIELDS  and  LINES  clauses is the same for both statements. The  mysqlimport  utility provides another way to load data files; it operates by sending a  LOAD DATA statement to the server. See Section 4.5.5, “mysqlimport — A Data Import Program” . For information about the efficiency of  INSERT  versus  LOAD DATA  and speeding up  LOAD DATA , see Section 8.2.5.1, “Optimizing INSERT Statements” . •Input File Character Set •Non-LOCAL Versus LOCAL Operation •Input File Location •Security Requirements •Duplicate-Key and Error Handling •Index Handling •Field and Line Handling •Column List Specification •Input Preprocessing •Column Value Assignment •Partitioned Table Support •Concurrency Considerations •Statement Result Information •Replication Considerations •Miscellaneous Topics Non-LOCAL Versus LOCAL Operation The  LOCAL  modifier affects these aspects of  LOAD DATA , compared to non- LOCAL  operation: •It changes the expected location of the input file; see Input File Location. •It changes the statement security requirements; see Security Requirements. •It has the same effect as the  IGNORE  modifier on the interpretation of input file contents and error handling; see Duplicate-Key and Error Handling, and Column Value Assignment. LOCAL  works only if the server and your client both have been configured to permit it. For example, if mysqld  was started with the  local_infile  system variable disabled,  LOCAL  produces an error. See Section 6.1.6, “Security Considerations for LOAD DATA LOCAL” . 2640