Geonames MySQL Data Importer

A shell Script to download and import geonames.org dumps into a mysql database.


This project is maintained by CodigoFuerte

Importing Geonames Data into MySQL

There are some individual operations that you could use. In all of them you have to provide a user name and a password to access your database server.

Optionally you can specify the host, port number of your MySQL server and a dabatase name in which to insert the data from geonames.org. If you don't provide this optional values the parameters will take the following deafult values:

Create a new database struct

geonames_importer.sh -a create-db -u user -p password [-h host] [-r port] [-n dbname]

Import the dumps obtained in the previous operation mode into the database

geonames_importer.sh -a import-dumps -u user -p password [-h host] [-r port] [-n dbname]

Dropping the geographic database ()

geonames_importer.sh -a drop-db -u user -p password [-h host] [-r port] [-n dbname]

CAUTION You will lose struct and data, so type carefully

Truncates geographic data from the database

geonames_importer.sh -a truncate-db -u user -p password [-h host] [-r port] [-n dbname]

This will delete all the data contained in the database but will keep the whole struct.