<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
On 06/11/2012 12:16 PM, Agustin Lobo wrote:
<blockquote
cite="mid:CAG4NReK=-kJN8aTHqO57pmV=Gmm2RK-ws9jTmMNU6K0gvKJ=VQ@mail.gmail.com"
type="cite">
<pre wrap="">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
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres">http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres</a>
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
<a class="moz-txt-link-freetext" href="http://ubuntuforums.org/showthread.php?t=1515069">http://ubuntuforums.org/showthread.php?t=1515069</a>
(actually, is it "normal" having to su to user postgres for using postgres?)</pre>
</blockquote>
<br>
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:<br>
<br>
sudo -i -u postgres psql<br>
postgres=# CREATE USER alobo WITH LOGIN SUPERUSER PASSWORD
'yourpassword';<br>
postgres=# GRANT ALL PRIVILEGES ON geospatial_desktop.* TO alobo
WITH GRANT OPTION;<br>
postgres=# \q<br>
<br>
Now put another line into pg_hba.conf<br>
host all alobo 127.0.0.1/32 trust<br>
<br>
Restart postgresql and try, as alobo, to connect with psql. If that
works then pgAdmin3 and QGIS should be OK.<br>
<br>
--<br>
Micha<br>
<br>
<blockquote
cite="mid:CAG4NReK=-kJN8aTHqO57pmV=Gmm2RK-ws9jTmMNU6K0gvKJ=VQ@mail.gmail.com"
type="cite">
<pre wrap="">
Agus
_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>