• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Postgresql localhost connection url?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Postgresql localhost connection url?


  • Subject: Re: Postgresql localhost connection url?
  • From: Kevin Spake <email@hidden>
  • Date: Mon, 03 Mar 2014 09:02:01 -0800

Yes, it was the colon. I can't believe I missed that. Of course, something tells me that's not the last time I'm going to say that to myself.

Thanks,

Kevin


On Mar 2, 2014, at 10:14 PM, Theodore Petrosky wrote:

>
>> jdbc:postgresql://localhost/5433/wonderbook
>
>
> if you want to include a port in a URL, you precede it with a colon   localhost:5432
>
> however assuming the database you want to connect to is called 'wonderbook' then the uri is;
>
> jdbc:postgresql://localhost/wonderbook   or
>
> jdbc:postgresql://127.0.0.1/wonderbook
>
>
> you don't add the port here. you must make sure that pg_hba.conf shows:
>
> # IPv4 local connections:
> host    all             all             127.0.0.1/32            trust
>
> basically saying that if anyone from the localhost machine tries to connect, let it and trust the connection. I just checked my postgresql.conf file and I see the line:
>
> #listen_addresses = 'localhost'		# what IP address(es) to listen on;
>
> is commented out so this is the default (to listen on localhost).
>
>
>
>
> On Mar 2, 2014, at 11:45 PM, Kevin Spake <email@hidden> wrote:
>
>> Hi there.
>>
>> I'm going through the Learning the Wonders book, and I'm at the point where I've built my first model, and I'm trying to generate the sql to it. My database is postgresql 9.3.  When I hit the "Generate SQL" button I get an error saying that it can't connect. Postgresql is running on the same computer, so I'm trying to connect to localhost over port 5433. I can connect to the database via psql, and pg admin, but not from my app.
>>
>> From what I've read, 9.3 should accept tcp/ip connections via localhost by default, without any configuration change. I've got the jdbc driver in the libraries folder and it was added to the build path. Maybe my url is wrong? This is the url I am using:  jdbc:postgresql://localhost/5433/wonderbook
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Kevin
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Postgresql localhost connection url? (From: Kevin Spake <email@hidden>)
 >Re: Postgresql localhost connection url? (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: Postgresql localhost connection url?
  • Next by Date: Re: Flattened to-one relationship problems
  • Previous by thread: Re: Postgresql localhost connection url?
  • Next by thread: Re: Postgresql localhost connection url?
  • Index(es):
    • Date
    • Thread