Author |
Message |
05/06/2017 23:11:48
|
john93
Joined: 31/05/2017 02:00:02
Messages: 1
Offline
|
Hello, I have the FR.zip file I would like to know how to import it into a database on mysql
|
|
|
08/06/2017 11:50:31
|
jonny512379
Joined: 11/02/2017 20:41:32
Messages: 10
Offline
|
Hello John
I have been doing similar.
there is no .sql file ready made for you to do this (as different users will want different things), but importing data is easy enough.
you may want to read this http://forum.geonames.org/gforum/posts/list/732.page but replace the file name in the "LOAD DATA INFILE" parts with the extracted FR file.
MySQL WorkBench should help you do this, but it is probably possible in phpmyadmin
hope this helps
Jon
|
|
|
27/09/2017 21:40:37
|
cale
Joined: 26/09/2017 08:49:01
Messages: 2
Offline
|
john93 wrote:
Hello, I have the FR.zip file I would like to know how to import it into a database on mysql
Haven't seen FR.zip yet but i believed the file is TAB DELIMITED.
You can import it the way you import .SQL file.
On phpMyAdmin
[list]Create a table first, the number of column must be the same with the number of column in FR.txt
You can name the column any name you want.
[/list]
[list]TYPE:
choose INT when the column content contains INTEGER or numbers
choose VARCHAR - VARIABLE CHARACTER - when the column content contains letters
[/list]
[list]LENGTH count the max number of INTEGER or CHARACTERS.
example: Hungary = is composed of 7 characters, to be sure, make an adjustment, make it more than 7, you can use 25.
[/list]
then save.
After creating the table, click your newly created table at the left bar,
click IMPORT
browse your file ex FR.txt
FORMAT ------ CSV
Format-specific options:
Columns separated with: ------- \t
\t for tab delimited, almost all file here in geonames are tab delimited. By default, the mysql is Columns separated with: , (comma), so replace it with \t
then click GO
|
|
|
|