import export

suggest change

Export. The file is written on the server host, and the account needs the FILE privilege:

SELECT a, b, c INTO OUTFILE 'result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM table_name;

Import. LOAD DATA reads a file on the server. LOAD DATA LOCAL reads a file on the client:

LOAD DATA INFILE 'result.txt' INTO TABLE table_name
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n';

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents