Search Postgresql Archives

Re: Installed. Now what?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 21, 2011 at 10:18 AM, Tomas Vondra <tv@xxxxxxxx> wrote:
> Dne 20.11.2011 03:33, Amitabh Kant napsal(a):
>> On Sun, Nov 20, 2011 at 4:14 AM, Phoenix Kiula <phoenix.kiula@xxxxxxxxx
>
>>
>> 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?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux