hello one and all,
i am having difficultly connecting postgres 9.1 under web2py v1.98.2
on a centos 6.0 box which has python 2.6.5. i have psycopg2 2.4
installed and working in python when i run the test
#python2.6 web2py -S welcom -N -a 'password'
then
>import psycopg2
>
works just fine. however, when i put
db = DAL('postgres://postgres:passwd@localhost:5432/prac2')
and attempt to click on database administrator, i get for the
traceback
Traceback (most recent call last):
File "/opt/web-apps/web2py/gluon/restricted.py", line 192, in
restricted
exec ccode in environment
File "/opt/web-apps/web2py/applications/prac2_with_postgresql/models/
db.py", line 83, in <module>
db = DAL('postgres://root:@localhost:5432/prac2')
File "/opt/web-apps/web2py/gluon/dal.py", line 3981, in __init__
raise RuntimeError, "Failure to connect, tried %d times:\n%s" %
(attempts, error)
RuntimeError: Failure to connect, tried 5 times:
could not connect to server: Permission denied
Is the server running on host "localhost" (127.0.0.1) and
accepting
TCP/IP connections on port 5432?
any ideas on what i have not done properly??? thank you in advance
and have a great day. lucas