Howdy,
trying to load a csv into mysql via the shell and i keep getting errors.
After logging into the DB server I do:
use database
to switch to the database, at this point I type:
LOAD DATA INFILE '/path/to/data_file.csv' INTO TABLE table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\' LINES TERMINATED BY '\r\n';
And I get an error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "table_name" at line 1
path and table name are both correct, any ideas?
Thanks!