This question already has an answer here:
i am successful to import data from my local pc but the problem is,it is not working on the server here is the code that works fine when i load the file from pc directory
LOAD DATA LOCAL INFILE 'C:/test.txt' INTO TABLE pet fields terminated by ',';
but it doesn't work when i put server location like
LOAD DATA LOCAL INFILE 'http://localhost/farzana/erp_fiat/files/test.text' INTO TABLE pet fields terminated by ',';
it will be very helpful if someone fix this problem
</div>
replace test.text
with test.txt
in the url and paste the URL in the browser if you can see the file,
else use the absolute path of the directory, instead of the URL
Remove LOCAL if you are loading it from server.
LOAD DATA INFILE 'http://localhost/farzana/erp_fiat/files/test.txt' INTO TABLE pet fields terminated by ',';
According to this answer:
When you do a LOAD DATA INFILE, the file must be on the system that is running the MySQL database, in the data path.
If the file is on your system, add the LOCAL keyword.
Try to remove the LOCAL
key word.