I am running a web server using a google cloud compute engine vm and I am trying to dump a cvs file into the database. I know LOAD DATA INFILE
is not supported, however LOAD DATA LOCAL INFILE
is. How do I use LOAD DATA LOCAL INFILE
?
Asked
Active
Viewed 1,442 times
2

Subedi Kishor
- 5,906
- 5
- 35
- 53

Chris Schlitt
- 561
- 1
- 4
- 20
-
check this out: http://stackoverflow.com/questions/13814775/google-cloud-sql-alternative-to-load-data-infile – Kamran Jun 13 '15 at 22:14
1 Answers
0
As suggested in this question, you can use LOAD DATA LOCAL INFILE to accomplish this task.
The command syntax is as follows:
LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name' [REPLACE | IGNORE] INTO TABLE tbl_name [CHARACTER SET charset_name] [{FIELDS | COLUMNS} [TERMINATED BY 'string'] [[OPTIONALLY] ENCLOSED BY 'char'] [ESCAPED BY 'char'] ] [LINES [STARTING BY 'string'] [TERMINATED BY 'string'] ] [IGNORE number {LINES | ROWS}] [(col_name_or_user_var,...)] [SET col_name = expr,...]
For more information, please refer to the MySQL documentation.