[Qgis-user] SPIT not seeing PostGres SQL Connections

Agustin Lobo alobolistas at gmail.com
Mon Jun 11 03:22:53 PDT 2012


Micha,

Just one question before I try: that password has to be the real
password or can it be
an specific password to be used by user alobo for postgres?
Actually writing a password is very unsecure.
Thanks
Agus

2012/6/11 Micha Silver <micha at arava.co.il>:
> On 06/11/2012 12:16 PM, Agustin Lobo wrote:
>
> Hi!
>
> I've followed (not without pain, see at the end) the example
> of creating a PostGIS database in G.Sherman book
> p. 113-121 on ubuntu 10.04.
> Thus, I have created a database named geospatial_desktop.
> Nevertheless, when I try to use SPIT to load the data,
> geospatial_desktop is not listed (actually nothing is listed)
> in the PostgSQL connections list.
> Is there any place where I have to tell QGIS the path
> of the databases?
>
> Problems I mentioned:
> 1. createdb -E UTF8 geospatial_desktop
> resulted into
> ident authentication failed for user "alobo"
> which was solved by modifying /etc/postgresql/8.4/main/pg_hba.conf
> according to
> http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres
>
> 2. The same command produced a second error:
> createdb: could not connect to database postgres: FATAL: role  "alobo"
> does not exist
>
> This was solved by running the commands preceded by sudo -i -u postgres,
> i.e.
>
> sudo -i -u postgres createdb -E UTF8 geospatial_desktop
>
> as mentioned in
> http://ubuntuforums.org/showthread.php?t=1515069
>
> (actually, is it "normal" having to su to user postgres for using postgres?)
>
>
> If this is a local-only database then what you might want to do is create a
> second superuser with your username, and grant him all privileges. Then go
> and re-edit the pg_hba.conf to allow this new user access from localhost,
> and you should be good to go. So:
>
> sudo -i -u postgres psql
> postgres=# CREATE USER alobo WITH LOGIN SUPERUSER PASSWORD 'yourpassword';
> postgres=# GRANT ALL PRIVILEGES ON geospatial_desktop.* TO alobo WITH GRANT
> OPTION;
> postgres=# \q
>
> Now put another line into pg_hba.conf
> host    all            alobo        127.0.0.1/32    trust
>
> Restart postgresql and try, as alobo, to connect with psql. If that works
> then pgAdmin3 and QGIS should be OK.
>
> --
> Micha
>
>
> Agus
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> This mail was received via Mail-SeCure System.
>
>
>



More information about the Qgis-user mailing list