pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedcould not connect via psql to 9.4 version
7+ messages / 6 participants
[nested] [flat]
* could not connect via psql to 9.4 version
@ 2020-02-13 16:22 Murali Paramu <ipmurali@gmail.com>
0 siblings, 3 replies; 7+ messages in thread
From: Murali Paramu @ 2020-02-13 16:22 UTC (permalink / raw)
To: pgsql-admin
Hello Team,
I have two versions of PostgreSQL 9.4 and 12.1
both servers can be connected through pgAdmin.
But through psql I can connect only to 12.1
when i connect to 9.4 got below error:
*$ psql -U postgres -p 5432psql: error: could not connect to server: 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"?*
--
~~~~~~~~~~~~~
സ്നേഹാദരങ്ങളോടെ
ഐ.പി.മുരളി
thanks & regards,
i.p.murali
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-13 16:31 Rahul Saha <rahul.blooming@gmail.com>
parent: Murali Paramu <ipmurali@gmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: Rahul Saha @ 2020-02-13 16:31 UTC (permalink / raw)
To: Murali Paramu <ipmurali@gmail.com>; +Cc: pgsql-admin
Hi Murali,
Is the 9,4 instance up and running? Check ps -ef|grep -i postgres | grep
5432
Check few other settings if not connecting locally like
#listen_addresses = 'localhost'(making to *) or pg_hba.conf settings.
On Thu, Feb 13, 2020 at 9:53 PM Murali Paramu <ipmurali@gmail.com> wrote:
> Hello Team,
> I have two versions of PostgreSQL 9.4 and 12.1
> both servers can be connected through pgAdmin.
> But through psql I can connect only to 12.1
>
> when i connect to 9.4 got below error:
>
>
>
>
> *$ psql -U postgres -p 5432psql: error: could not connect to server: 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"?*
>
> --
> ~~~~~~~~~~~~~
> സ്നേഹാദരങ്ങളോടെ
> ഐ.പി.മുരളി
> thanks & regards,
> i.p.murali
>
>
--
Thanks & Regards
Rahul Saha
+91 8806351116
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-13 16:43 David G. Johnston <david.g.johnston@gmail.com>
parent: Murali Paramu <ipmurali@gmail.com>
2 siblings, 0 replies; 7+ messages in thread
From: David G. Johnston @ 2020-02-13 16:43 UTC (permalink / raw)
To: Murali Paramu <ipmurali@gmail.com>; +Cc: pgsql-admin
On Thu, Feb 13, 2020 at 9:23 AM Murali Paramu <ipmurali@gmail.com> wrote:
> Hello Team,
> I have two versions of PostgreSQL 9.4 and 12.1
> both servers can be connected through pgAdmin.
> But through psql I can connect only to 12.1
>
> when i connect to 9.4 got below error:
>
>
>
>
> *$ psql -U postgres -p 5432psql: error: could not connect to server: 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"?*
>
>
So what is the configuration in pgAdmin for its connection to the 9.4
server? You need to make your psql invocation match.
David J.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-13 17:10 Jeff Janes <jeff.janes@gmail.com>
parent: Murali Paramu <ipmurali@gmail.com>
2 siblings, 2 replies; 7+ messages in thread
From: Jeff Janes @ 2020-02-13 17:10 UTC (permalink / raw)
To: Murali Paramu <ipmurali@gmail.com>; +Cc: pgsql-admin
On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu <ipmurali@gmail.com> wrote:
> Hello Team,
> I have two versions of PostgreSQL 9.4 and 12.1
> both servers can be connected through pgAdmin.
> But through psql I can connect only to 12.1
>
> when i connect to 9.4 got below error:
>
>
>
>
> *$ psql -U postgres -p 5432psql: error: could not connect to server: 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"?*
>
>
Perhaps 9.4 is configured to put its socket file in /tmp instead of
/var/run/postgresql/. You can try -h /tmp, or you can just always use -h
127.0.0.1, then you don't need to worry where the socket file is.
Cheers,
Jeff
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-13 17:24 zurich@nym.hush.com
parent: Jeff Janes <jeff.janes@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: zurich@nym.hush.com @ 2020-02-13 17:24 UTC (permalink / raw)
To: Murali Paramu <ipmurali@gmail.com>; +Cc: pgsql-admin
Have you checked the local settings in the pg_hba.conf as this will affect permitted access.
You can compare what is set differently between the different versions of postgreSQL.
Cheers
Peter
On 2/13/2020 at 5:11 PM, "Jeff Janes" <jeff.janes@gmail.com> wrote:
>
>On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu
><ipmurali@gmail.com> wrote:
>
>> Hello Team,
>> I have two versions of PostgreSQL 9.4 and 12.1
>> both servers can be connected through pgAdmin.
>> But through psql I can connect only to 12.1
>>
>> when i connect to 9.4 got below error:
>>
>>
>>
>>
>> *$ psql -U postgres -p 5432psql: error: could not connect to
>server: 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"?*
>>
>>
>Perhaps 9.4 is configured to put its socket file in /tmp instead of
>/var/run/postgresql/. You can try -h /tmp, or you can just always
>use -h
>127.0.0.1, then you don't need to worry where the socket file is.
>
>Cheers,
>
>Jeff
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-14 11:22 abbas alizadeh <ramkly@yahoo.com>
parent: Jeff Janes <jeff.janes@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: abbas alizadeh @ 2020-02-14 11:22 UTC (permalink / raw)
To: Jeff Janes <jeff.janes@gmail.com>; +Cc: Murali Paramu <ipmurali@gmail.com>; pgsql-admin
Hi.
You should use the right psql for version 9.4.
In linux run “which psql” to see which version is used to connect
Sent from my iPhone
> On Feb 14, 2020, at 01:11, Jeff Janes <jeff.janes@gmail.com> wrote:
>
>
>> On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu <ipmurali@gmail.com> wrote:
>
>> Hello Team,
>> I have two versions of PostgreSQL 9.4 and 12.1
>> both servers can be connected through pgAdmin.
>> But through psql I can connect only to 12.1
>>
>> when i connect to 9.4 got below error:
>> $ psql -U postgres -p 5432
>> psql: error: could not connect to server: 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"?
>>
>
> Perhaps 9.4 is configured to put its socket file in /tmp instead of /var/run/postgresql/. You can try -h /tmp, or you can just always use -h 127.0.0.1, then you don't need to worry where the socket file is.
>
> Cheers,
>
> Jeff
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: could not connect via psql to 9.4 version
@ 2020-02-15 14:45 Murali Paramu <ipmurali@gmail.com>
parent: abbas alizadeh <ramkly@yahoo.com>
0 siblings, 0 replies; 7+ messages in thread
From: Murali Paramu @ 2020-02-15 14:45 UTC (permalink / raw)
To: abbas alizadeh <ramkly@yahoo.com>; +Cc: Jeff Janes <jeff.janes@gmail.com>; pgsql-admin
Thank you all guys for the help...
when i use right psql it connected.
/opt/PostgreSQL/9.4/bin$ /opt/PostgreSQL/9.4/bin/psql -U postgres
On Fri, Feb 14, 2020 at 3:22 PM abbas alizadeh <ramkly@yahoo.com> wrote:
> Hi.
> You should use the right psql for version 9.4.
> In linux run “which psql” to see which version is used to connect
>
> Sent from my iPhone
>
> On Feb 14, 2020, at 01:11, Jeff Janes <jeff.janes@gmail.com> wrote:
>
>
> On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu <ipmurali@gmail.com> wrote:
>
>> Hello Team,
>> I have two versions of PostgreSQL 9.4 and 12.1
>> both servers can be connected through pgAdmin.
>> But through psql I can connect only to 12.1
>>
>> when i connect to 9.4 got below error:
>>
>>
>>
>>
>> *$ psql -U postgres -p 5432psql: error: could not connect to server:
>> 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"?*
>>
>>
> Perhaps 9.4 is configured to put its socket file in /tmp instead of
> /var/run/postgresql/. You can try -h /tmp, or you can just always use -h
> 127.0.0.1, then you don't need to worry where the socket file is.
>
> Cheers,
>
> Jeff
>
>
--
~~~~~~~~~~~~~
സ്നേഹാദരങ്ങളോടെ
ഐ.പി.മുരളി
thanks & regards,
i.p.murali
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-02-15 14:45 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 16:22 could not connect via psql to 9.4 version Murali Paramu <ipmurali@gmail.com>
2020-02-13 16:31 ` Rahul Saha <rahul.blooming@gmail.com>
2020-02-13 16:43 ` David G. Johnston <david.g.johnston@gmail.com>
2020-02-13 17:10 ` Jeff Janes <jeff.janes@gmail.com>
2020-02-13 17:24 ` zurich@nym.hush.com
2020-02-14 11:22 ` abbas alizadeh <ramkly@yahoo.com>
2020-02-15 14:45 ` Murali Paramu <ipmurali@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox