Thread: OSX: Allow connection from remote host (actually from windows running in parallels)
OSX: Allow connection from remote host (actually from windows running in parallels)
From
"Bill P."
Date:
I am trying to connect to my OSX installed version of PG from Windows XP SP3 running in Parallels on my mac.
When I try to connect, i get an error about no entry in the pg_hba.conf for the ip i am trying to connect to.
I used pgAdmin3 to try to edit the file. postgresql.conf first to enable to the pg_hba.conf dir and then the pg_hba.conf file.
Neither allows me to edit and save these files due to permissions.
I also tried to edit them through the terminal, that didnt work and also added my user to the people allowed to read/write those two files.
Then through a text editor, it seemed to work (as well as doing it again through pgAdmin) and then when saved, PG would not start back up.
So what is the correct process to edit these files and allow pg to be connected to by remote host.
Thanks.
Bill
(tried posting this on the forums and got the same errors not allowing me to do so)
When I try to connect, i get an error about no entry in the pg_hba.conf for the ip i am trying to connect to.
I used pgAdmin3 to try to edit the file. postgresql.conf first to enable to the pg_hba.conf dir and then the pg_hba.conf file.
Neither allows me to edit and save these files due to permissions.
I also tried to edit them through the terminal, that didnt work and also added my user to the people allowed to read/write those two files.
Then through a text editor, it seemed to work (as well as doing it again through pgAdmin) and then when saved, PG would not start back up.
So what is the correct process to edit these files and allow pg to be connected to by remote host.
Thanks.
Bill
(tried posting this on the forums and got the same errors not allowing me to do so)
Re: OSX: Allow connection from remote host (actually from windows running in parallels)
From
Andreas Kretschmer
Date:
Bill P. <maxarbos@yahoo.com> wrote: > I am trying to connect to my OSX installed version of PG from Windows XP SP3 > running in Parallels on my mac. > > When I try to connect, i get an error about no entry in the pg_hba.conf for the > ip i am trying to connect to. > I used pgAdmin3 to try to edit the file. postgresql.conf first to enable to the > pg_hba.conf dir and then the pg_hba.conf file. You have to edit the pg_hba.conf file on the server. I don't know if it is possible with pgadmin, but i doubt ... And i don't know what you mean with "edit the file. postgresql.conf first to enable to the pg_hba.conf dir". Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
Re: OSX: Allow connection from remote host (actually from windows running in parallels)
From
Jan Eden
Date:
On 04.01.2011, at 17:51, Bill P. wrote: > I am trying to connect to my OSX installed version of PG from Windows XP SP3 running in Parallels on my mac. > > When I try to connect, i get an error about no entry in the pg_hba.conf for the ip i am trying to connect to. > I used pgAdmin3 to try to edit the file. postgresql.conf first to enable to the pg_hba.conf dir and then the pg_hba.conffile. > > Neither allows me to edit and save these files due to permissions. > > I also tried to edit them through the terminal, that didnt work and also added my user to the people allowed to read/writethose two files. > Then through a text editor, it seemed to work (as well as doing it again through pgAdmin) and then when saved, PG wouldnot start back up. You could check the most recent log file in /Library/PostgreSQL/9.0/data/pg_log – it will tell you why the server restartfailed. > So what is the correct process to edit these files and allow pg to be connected to by remote host. AFAIK, Parallels creates some virtual network adapter, so the virtualized Windows environment would have to go through thisadapter to the "physical" localhost (127.0.0.1). I have not tried to do this before, so I cannot help you here. Kind regards, Jan
Re: OSX: Allow connection from remote host (actually from windows running in parallels)
From
"Bill P."
Date:
In pgAdmin 3, there are choices under the file menu to edit (open) the .pgpass, pg_hba.conf and postgresql.conf files. That is one of the utilities I tried to edit these files.
As far as the : "edit the file. postgresql.conf first to enable to the pg_hba.conf dir" comment.
I was referring to the fact that the error I was getting when trying to connect from Windows to OSX, that stated that I didn't have a record in the pg_hda.conf file. In order for this file to be read and used, there is a path and attribute that needs to be enabled in the 'postgresql.conf' file to use the pg_hba.conf dir/file. I wasnt sure if there was a certain order that this all needs to be done in or using which method to edit these files.
The pg_hba.conf file I am editing is on the 'server', the OSX installed version of PG.
As far as the : "edit the file. postgresql.conf first to enable to the pg_hba.conf dir" comment.
I was referring to the fact that the error I was getting when trying to connect from Windows to OSX, that stated that I didn't have a record in the pg_hda.conf file. In order for this file to be read and used, there is a path and attribute that needs to be enabled in the 'postgresql.conf' file to use the pg_hba.conf dir/file. I wasnt sure if there was a certain order that this all needs to be done in or using which method to edit these files.
The pg_hba.conf file I am editing is on the 'server', the OSX installed version of PG.
From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-novice@postgresql.org
Sent: Tue, January 4, 2011 12:32:18 PM
Subject: Re: [NOVICE] OSX: Allow connection from remote host (actually from windows running in parallels)
Bill P. <maxarbos@yahoo.com> wrote:
> I am trying to connect to my OSX installed version of PG from Windows XP SP3
> running in Parallels on my mac.
>
> When I try to connect, i get an error about no entry in the pg_hba.conf for the
> ip i am trying to connect to.
> I used pgAdmin3 to try to edit the file. postgresql.conf first to enable to the
> pg_hba.conf dir and then the pg_hba.conf file.
You have to edit the pg_hba.conf file on the server. I don't know if it
is possible with pgadmin, but i doubt ...
And i don't know what you mean with "edit the file. postgresql.conf
first to enable to the pg_hba.conf dir".
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice