GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to insert allCountries.txt into a Mysql DB?  XML
Forum Index -> General
Author Message
yello



Joined: 08/12/2006 03:26:08
Messages: 1
Offline

Hi there,

I would like to know how to insert the big allCountries.txt file into a mysql db. Step by Step cause I ain't a pro in managing a db...

I have phpmyadmin + easyphp.

Thank you!
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Hi Yello

There is this faq entry on creating a table :
http://forum.geonames.org/gforum/posts/list/80.page

and a thread about synchronizing your db with geonames :
http://groups-beta.google.com/group/geonames/browse_thread/thread/26d84fc11a2c78cc?hl=en

Hope this helps

Cheers

Marc

[WWW]
Anonymous



by "synchronizing your db" you mean I just copy/paste that code in a text editor to make a php file and run it on my machine?

Excuse my newbie questions
Anonymous



It should also be possible to use ftp to upload the file to the server. And than use phpmyadmin to send a sql command: LOAD DATA INFILE

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

You should try it first local (e.g. XAMPP).

Greetings
marc



Joined: 08/12/2005 07:39:47
Messages: 4416
Offline

Hi

With synchronization I meant how to get the newest modifications of geonames into your data base without having to reload the full dump. But you have to load it first, before thinking about this.

For copy/paste the data set may be too large and you should look at the mysql load functions if you don't know them.

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team