So  I downloaded the geoCity data from the http://www.maxmind.com/app/geolite

 

I created following table to import this data into the mysql database

 

CREATE TABLE `geo_city` (
`locId` int(11) NOT NULL,
`country` varchar(50) default NULL,
`region` varchar(50) default NULL,
`city` varchar(50) default NULL,
`postalCode` varchar(50) default NULL,
`latitude` decimal(28,10) default NULL,
`longitude` decimal(28,10) default NULL,
`metroCode` varchar(50) default NULL,
`areaCode` varchar(50) default NULL,
PRIMARY KEY (`locId`)
)

Advertisements