[Gambas-user] Swee Kwang Tan: postgresql
Steven James Drinnan
steven at ...2097...
Wed Jun 24 03:33:35 CEST 2009
Hi,
What is exactly happening. I use F11 and running gambas2.13.1
As I never used postgresql before I prefer mysql but never mind.
I tried to use the example "Picture Database' and changed to postgresql
by opening the main forms code and uncommenting the postgresql part.
It did not work - but I realized that postgresql was not installed.
So I installed postgresql and postgresql server by
su
yum install postgresql postgresql-server
then once installed i ran
code:
chkconfig postgresql on
service postgresql initdb
service postgresql start
endcode:
to make sure it was started i ran
service postgresql restart
I ran the example again but still no luck, but after some digging I
found this.
Need to change this file to 'trust'
as su
code:
gedit /var/lib/pgsql/data/pg_hba.conf
end code:
find this section
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 ident sameuser
# IPv6 local connections:
host all all ::1/128 ident sameuser
and change ident to trust like so
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 trust sameuser
# IPv6 local connections:
host all all ::1/128 ident sameuser
Restart postgresql
code:
service postgresql restart
end code:
I tried again and now I can connect.
So have a look at your setup. Fedora may have the rpm packages set up
wrong but they do all work i.e they are complete. Just make sure you
have the gambas db component installed
Tell me how you get on.
Steven
On Tue, \
2009-06-23 at 13:01 +0200, Charlie Reinl wrote:
> Am Dienstag, den 23.06.2009, 03:25 -0700 schrieb Swee Kwang Tan:
> > fedora 11
>
> Salut,
>
> I do not know where fedora 11 stores its' gambas lib files
> (normaly /usr/local/lib/gambas<VERSION>)
> nor witch gambas version you use ?
>
> but look at your box if this files or links :
> gb.db.postgresql.component
> gb.db.postgresql.la
> gb.db.postgresql.so -> gb.db.postgresql.so.0.0.0
> gb.db.postgresql.so.0 -> gb.db.postgresql.so.0.0.0
> gb.db.postgresql.so.0.0.0
>
> If not you can not open a postgresql DB.
>
More information about the User
mailing list