From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Nuno Zimas <nzimas(at)gmail(dot)com> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: user can't access own database after creation |
Date: | 2015-12-02 21:36:57 |
Message-ID: | CADK3HHKUBrz1-jBOWABXmfBhUiwqmfF9CYr3F7qhf+JxdLjYKg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Nuno,
Ok,
This code works. Note you need host and db in the url
import java.sql.DriverManager;
import java.sql.Connection;
/**
* Created by davec on 2014-03-28.
*/
class TestUrl
{
public static void main(String []args) throws Exception
{
Connection con =
DriverManager.getConnection("jdbc:postgresql://localhost/test","youruser","password");
con.createStatement().execute("select 1");
}
}
Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
On 2 December 2015 at 16:31, Nuno Zimas <nzimas(at)gmail(dot)com> wrote:
> On 2 Dec 2015, at 21:24, John R Pierce <pierce(at)hogranch(dot)com> wrote:
>
> On 12/2/2015 1:00 PM, Nuno Zimas wrote:
>
>
> what does the pg_hba.conf file look like on the ubuntu server ?
>
>
>
> You can see the file contents here:
> http://pastebin.com/vYQMsP27
>
>
>
> these three lines,
>
> 1. host all all 78.47.104.116/32
> trust
> 2. host all all 62.210.69.197/32
> trust
> 3. host all all 10.10.10.99/32
> trust
>
>
> they state that anyone on those 3 hosts can connect as any postgres user
> including the superuser 'postgres' without any authentication required at
> all
>
> That’s pretty much the intended behaviour at this point.
> As far as SSL goes, it really doesn’t make any difference.
> I’ve tried adding ?ssl=true and ?ssl=false to the jdbc URL with no success.
>
>
> .
> Also, I see nothing in there about SSL.
>
> --
> john r pierce, recycling bits in santa cruz
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Nuno Zimas | 2015-12-02 21:44:40 | Re: user can't access own database after creation |
Previous Message | Nuno Zimas | 2015-12-02 21:31:29 | Re: user can't access own database after creation |