Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LOAD DATA LOCAL INFILE php mysql

Tags:

php

mysql

I am getting error

#7890 - Can't find file 'C:UsersAdminDesktopBL postcodes.csv.zip'.

here is the script

LOAD DATA LOCAL INFILE 'C:\Users\Admin\Desktop\BL postcodes.csv.zip' 
IGNORE INTO TABLE uk_pc 
FIELDS TERMINATED BY ',' 
LINES TERMINATED BY '\n' 
(Postcode, Latitude, Longitude, Easting, Northing, GridRef, County, District, Ward, DistrictCode, WardCode, Country, CountyCode)

i have tried to change folders and change permission also but same error ... (working on localhost server)

like image 455
Harinder Avatar asked Oct 22 '22 21:10

Harinder


1 Answers

'C:UsersAdminDesktopBL postcodes.csv.zip' path has to be wrong because it doesn't have traling slashes. try: INFILE 'C:\\Users\\Admin\\Desktop\\BL postcodes.csv.zip'

And try with unpacked file.

like image 95
Disa Avatar answered Nov 02 '22 09:11

Disa