Im using MySQL Workbench and tried using load data local infile. I have my table "mysample" with three columns: id, names, age.
Im trying to load a csv file and import it inside my table. id is auto_increment so I will insert the datas to names and age. This is my query:
load data local infile 'C:\Users\vissia18\Desktop\sample.csv' into table mysample fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(names, age)
But the problem is I'm having an error like this:
Error Code: 2. File 'C:\Users\vissia18\Desktop\sample.csv' not found
Why is that? How should I fix this?
According to MySQL documentation :
The file name must be given as a literal string. On Windows, specify backslashes in path names as forward slashes or doubled backslashes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.