Download and Import Geonames (Geonames.org) & Geolite (Maxmind.com) in a MySQL Database
Databases (Services)
The GeoNames geographical database is available for download free of charge under a creative commons attribution license. It contains over 10 million geographical names and consists of over 9 million unique features whereof 2.8 million populated places and 5.5 million alternate names. All features are categorized into one out of nine feature classes and further subcategorized into one out of 645 feature codes.
GeoNames is integrating geographical data such as names of places in various languages, elevation, population and others from various sources.
The GeoLite2 databases are distributed under the Creative Commons Attributions License.
GeoLite2 databases are free IP geolocation databases. Includes the GeoNames IDs for localization and pairing outside data.
The GeoLite2 databases are distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.
Clone or Download GeoData Importer
git clone https://github.com/IsiRoca/Geodata-Importer.githttps://github.com/IsiRoca/Geodata-Importer/archive/master.zipDownload all data
./geodata_importer.sh --download-dataDownload all data in separated files by country
./geodata_importer.sh --download-data allDownload one country by country code. You can get all code countries with --country-info
./geodata_importer.sh --download-data cnCreate your local database
./geodata_importer.sh -a create-db -uYOURUSER -pYOURPASSWORDImport data in your database
./geodata_importer.sh -a import-all -uYOURUSER -pYOURPASSWORD./geodata_importer.sh -a import-geonames -uYOURUSER -pYOURPASSWORD./geodata_importer.sh -a import-geonames -uYOURUSER -pYOURPASSWORD cn./geodata_importer.sh -a import-geolite -uYOURUSER -pYOURPASSWORDDrop your database
./geodata_importer.sh -a drop-db -uYOURUSER -pYOURPASSWORDDrop your database
./geodata_importer.sh -a truncate-db -uYOURUSER -pYOURPASSWORD./geodata_importer.sh -a truncate-db-geonames -uYOURUSER -pYOURPASSWORD./geodata_importer.sh -a truncate-db-geolite -uYOURUSER -pYOURPASSWORDRemove download folder
./geodata_importer.sh --remove-dataGet countries codes info
./geodata_importer.sh --country-infoGet languages codes info
./geodata_importer.sh --language-infoCheck all downloaded files info
./geodata_importer.sh --download-infoIf you have a patch, or stumbled upon an issue with GeoData Importer, you can contribute this back to the code
This is free software, licensed under the MIT License (MIT).
@Author: Isi Roca @Support: Issues & Support