Import CSV file directly into MySQL:
直接下MYSQL指令 先建立資料表以及欄位,再匯入scv檔案:
load data local infile 'D:/AppServ/www/test/geoip/ip2country/GeoIPCountryWhois.csv' into table tblUserIP fields terminated by ','
enclosed by '"'
lines terminated by '\n'
Import CSV file directly into MySQL:
直接下MYSQL指令 先建立資料表以及欄位,再匯入scv檔案:
load data local infile 'D:/AppServ/www/test/geoip/ip2country/GeoIPCountryWhois.csv' into table tblUserIP fields terminated by ','
enclosed by '"'
lines terminated by '\n'
ERROR 1153 (08S01) at line 3802: Got a packet bigger than 'max_allowed_packet' by tes
當上傳的.sql檔案過大,
受MYSQL參數max_allowed_packet(預設為1048576K)的限制,所以會產生上面的錯誤訊息。
(1G = 1*1024*1024K)