Re: user can't access own database after creation
От | Dave Cramer |
---|---|
Тема | Re: user can't access own database after creation |
Дата | |
Msg-id | CADK3HHKUBrz1-jBOWABXmfBhUiwqmfF9CYr3F7qhf+JxdLjYKg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: user can't access own database after creation (Nuno Zimas <nzimas@gmail.com>) |
Список | 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");
}
}
On 2 December 2015 at 16:31, Nuno Zimas <nzimas@gmail.com> wrote:
On 2 Dec 2015, at 21:24, John R Pierce <pierce@hogranch.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:
these three lines,
host all all 78.47.104.116/32 trust host all all 62.210.69.197/32 trust 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
В списке pgsql-jdbc по дате отправления: