Huge IP2Location Database

Someone checked in a nice little IP2Location database last night. It's basically what you would use for Geolocation software. You figure out the decimal ip and by checking if it's in that range, it will give you the city, state, latitude and longitude, and the ISP.

That sounds great and all, but it's huge. 460 MB, ~4.2 million lines, 1 CSV file. Tried to open it in excel, after about 10 minutes, it ends up stopping somewhere around 400k entries. Tried Notepad++, killed it before it exhausted all of the memory. So, I haven't even be able to check if it my IP is listed correctly.

I then wanted to throw it in phpmyadmin on this site, but it doesn't seem to have the import things. Damn (though the limit on that I think is about 20 megs. It compresses down to about 60 when gzipped).

I guess I could always run
mysqlimport --fields-optionally-enclosed-by=""" --fields-terminated-by=, --lines-terminated-by="\r\n" --user=user --password=pass IP2LOC.csv
And see how long before it gets killed. Unless they got rid of the mysqlimport command. For some reason, I really want to use this database, even though I have no real use for it.

Leave a Reply