Re: Installed. Now what? - Mailing list pgsql-general

From Phoenix Kiula
Subject Re: Installed. Now what?
Date
Msg-id CAFWfU=tkz9g2aYBVtP89B8=GQu9EMcAcRy4k1t0AxaQuGuUaYA@mail.gmail.com
Whole thread Raw
In response to Re: Installed. Now what?  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: Installed. Now what?
List pgsql-general
On Mon, Nov 21, 2011 at 10:18 AM, Tomas Vondra <tv@fuzzy.cz> wrote:
> Dne 20.11.2011 03:33, Amitabh Kant napsal(a):
>> On Sun, Nov 20, 2011 at 4:14 AM, Phoenix Kiula <phoenix.kiula@gmail.com
>
>>
>> Does the auth file (/var/lib/pgsql/pgbouncer.txt) contain valid login
>> credentials to your database? If I remember correctly, it should have
>> the username and password to your database.
>
> No, it shouldn't. It should contain credentials for connecting to the
> pgbouncer. The database credentials should go to the connection string
> in '[databases]' section of your ini file.



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");



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.

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?

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: Incremental backup with RSYNC or something?
Next
From: Phoenix Kiula
Date:
Subject: Re: Table Design question for gurus (without going to "NoSQL")...