Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 50 line objects in .shp format in folder on my computer. I need to insert it to postgis database on the distant server.. When I log in in phpPgAdmin, it says it runs on localhost:5433. What is the quick way to insert my .shp data into database?

share|improve this question
up vote 4 down vote accepted

You can run shp2pgsql to convert the shapefile into SQL. You should be able to execute the resulting SQL file in phpPgAdmin.

QGIS offers a GUI for shp2pgsql via "Postgis Manager" plugin. You can connect to the remote database and load shapefiles directly without the need for phpPgAdmin.

share|improve this answer
I don't understand where to find Postgis Manager plugin? – againstflow Jun 9 '11 at 16:21
I found it, I'll try it now. – againstflow Jun 9 '11 at 16:28
I can't connect to my database. – againstflow Jun 9 '11 at 16:37
Note: Postgres has to be configured to listen to external IPs. This is not enabled by default – underdark Jun 9 '11 at 16:49

On windows PgAdmin III is under Start->Programs->PostgreSQL 8.4->PgAdmin III Login with the super user usually postgres and the password you chose during install. If you forgot it, then go into pg_hba.conf (just open it with an editor such as notepad or a programmer editor). Set the line

host all all md5


host all all trust

if you trust it use

host all all localhost/5433 trust (host all all md5 will give all users access)
share|improve this answer

Another way to do this is to use SSH tunnels - use putty (or other SSH client) to log in to the remote machine and set a tunnel from localhost:5433 to remotemachine:5433. See for more details. Then you can run PGAdmin on your local machine and it will talk directly to the remote machine.

share|improve this answer
I can't connect to database. I tried with putty but it doesn't work. – againstflow Jun 9 '11 at 16:36
if you log into the remote machine can you access the DB? – iant Jun 9 '11 at 19:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.