From: | Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Installed. Now what? |
Date: | 2011-11-21 02:21:48 |
Message-ID: | CAFWfU=s=9v8VS8Og-gfSYEa0dtJOAGrGytMZ3P41K5wG9+SACg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Nov 21, 2011 at 10:54 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> Dne 21.11.2011 02:44, Phoenix Kiula napsal(a):
>> Thanks Tomas and everyone.
>>
>> I have the following passwords:
>>
>> 1. Pgbouncer.ini file
>>
>> [databases]
>> MYDB = host=127.0.0.1 dbname=MYDB user=MYDB_MYDB client_encoding=utf8
>> port=5432 password=='bypass'
>>
>>
>> 2. In the auth_file (with auth_type set to "md5")
>>
>> auth_type = md5
>> auth_file = /var/lib/pgsql/pgbouncer.txt
>>
>> Inside the auth_file:
>> "me" "<an md5 string>"
>>
>>
>> 3. In the PHP file where I need to call with pg_connect() function.
>> This is the postgresql database user as usual.
>>
>> pg_connect("host=127.0.0.1 dbname=$db port=6432 user=$user password=$pass");
>
> I guess the $user is 'me' (as stated in pgbouncer.txt) and the password
> corresponds to pgbouncer.txt (i.e. when MD5-hashed the result is equal
> to the value in the file).
>
>> Questions:
>>
>> a. For #2, the pgbouncer password, do I need to create this "me" user
>> somewhere, or just writing here in the auth_file is fine? I have not
>> "created" this user anywhere else yet. Just written the user name and
>> md5 of the password in the auth_file.
>
> No. The user is "created" by listing the username/password in the auth_file.
>
>> b. In the connection string in #3 above, I need to be mentioning the
>> pgbouncer user name, right? Will the password then be md5 as in
>> auth_file? Or nothing?
>
> You need to put the pgbouncer user name (as listed in the auth_file).
> The password has to be the actual value, not the hash. Otherwise it'd be
> equal to auth_type=plain.
>
Very clear. So all the passwords are now correct.
Now, when I do "service pgbouncer restart", it shows me FAILED.
I'm on CentOS 5, 64 bit. PG is 9.0.5.
The PG log has nothing about this.
The pgbouncer log has nothing either, just a huge list of:
2011-11-20 09:03:46.855 10854 LOG Stats: 0 req/s, in 0 b/s, out 0 b/s,query 0 us
2011-11-20 09:04:46.856 10854 LOG Stats: 0 req/s, in 0 b/s, out 0 b/s,query 0 us
2011-11-20 09:05:46.856 10854 LOG Stats: 0 req/s, in 0 b/s, out 0 b/s,query 0 us
2011-11-20 09:06:46.857 10854 LOG Stats: 0 req/s, in 0 b/s, out 0 b/s,query 0 us
Any ideas on how I can determine what's going wrong?
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Flower | 2011-11-21 02:22:05 | Re: Table Design question for gurus (without going to "NoSQL")... |
Previous Message | Tomas Vondra | 2011-11-21 02:18:17 | Re: Installed. Now what? |