Обсуждение: Facing authentication error on postgres 9.2 -> dblink functions
Hello Everyone,
I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows:
SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')
ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user "NETWORK SERVICE"
What this error is related to? Do I need to modify pg_hba.conf file by any chance?
Thanks..
I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows:
SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')
ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user "NETWORK SERVICE"
What this error is related to? Do I need to modify pg_hba.conf file by any chance?
Thanks..
Dev Kumkar wrote:
> I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to
> execute dblink_connect as follows:
>
> SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')
>
> ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user
> "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by any chance?
You should specify a user=username option in the connection string,
otherwise that defaults to your operating system user name.
Yours,
Laurenz Albe
On 02/06/2013 08:09 AM, Dev Kumkar wrote:
> Hello Everyone,
>
> I am using postgres 9.2 and when executing function dblink facing a
> fatal error while trying to execute dblink_connect as follows:
>
> /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
> dbname=postgres password=test')/
>
> *ERROR*: could not establish connection DETAIL: FATAL: password
> authentication failed for user "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by
> any chance?
>
> Thanks..
>
Do NOT send questions to multiple lists. That is a waste of everybody's
time. So do NOT follow up this email. This question belongs on
pgsql-general. If you have further questions pleease ask there.
The short answer is that you need to provide the user name in your
connect string.
cheers
andrew
Apologies for posting on multiple lists, surely will take care of this next time.<br /><br />Yup adding user=username
resolvedthis. Thanks to 'Laurenz Albe' and you too.<br /><br />Regards - Dev<br /><br /><div class="gmail_quote"> On
Wed,Feb 6, 2013 at 7:12 PM, Andrew Dunstan <span dir="ltr"><<a href="mailto:andrew@dunslane.net"
target="_blank">andrew@dunslane.net</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"><div class="im"><br /> On 02/06/2013 08:09 AM, Dev Kumkar wrote:<br
/></div><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div
class="im">Hello Everyone,<br /><br /> I am using postgres 9.2 and when executing function dblink facing a fatal error
whiletrying to execute dblink_connect as follows:<br /><br /></div> /SELECT * FROM dblink_connect('host=127.0.0.1
port=5432dbname=postgres password=test')/<br /><br /> *ERROR*: could not establish connection DETAIL: FATAL: password
authenticationfailed for user "NETWORK SERVICE"<div class="im"><br /><br /> What this error is related to? Do I need to
modifypg_hba.conf file by any chance?<br /><br /> Thanks..<br /><br /></div></blockquote><br /><br /> Do NOT send
questionsto multiple lists. That is a waste of everybody's time. So do NOT follow up this email. This question belongs
onpgsql-general. If you have further questions pleease ask there.<br /><br /> The short answer is that you need to
providethe user name in your connect string.<br /><br /> cheers<span class="HOEnZb"><font color="#888888"><br /><br />
andrew<br/></font></span></blockquote></div><br /><br />