Greetings everyone, Consider the following scenario: I was working with web.py, Python 2.4 and PostgreSQL on a Windows machine for a while. To connect to the database, I used the "postgres" username and its password.
Now, I am working with a friend of mine on something we hope to be a decent webapp. We setup our machines with Linux, Python (2.4 and 2.5) and PostgreSQL 8.2, using psycopg2 as the driver. In both of these machines, I wanted to create a PostgreSQL user that would have a common name/password (something like developer/ my_dev_passwd), so that we wouldn't have to worry about that when dealing with version control. I also wanted to be a user different from postgres, to avoid the bad habit of working with a user that had full access to database manipulation. I managed to create this user in postgres. No biggie. My issue was that, when I tried to run web.py code that had to access the database, I got the following exception: - psycopg2.OperationalError could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/ run/postgresql/.s.PGSQL.5432"? Thing is, I don't know where to look for. I changed my pg_hba.conf to look something like this: ----------------------------------- # Database administrative login by UNIX sockets local all postgres ident sameuser # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all password # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 ------------------------------------------------------------------ And I do get to connect to the database if I use 'psql -U developer -d TestDatabase'. So, it seems to be running. So, to sum up: where am I screwing things up? Thanks in Advance, Raphael Lullis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
