From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | mdr <monosij(dot)forums(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trying to create DB / user to import some data |
Date: | 2013-09-27 16:39:14 |
Message-ID: | 5245B4B2.6050109@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 09/27/2013 09:26 AM, mdr wrote:
> Hi Steven -
>
> Thanks. Worked great. I assumed it would assume the dbname to be
> import_dbms_db as import_dbms_user was granted admin privileges on it.
User names are global to a Postgres cluster, they can be used for any
database in that cluster.
>
> Also I do have import_dbms_user and import_dbms_db in my pg_hba.conf as:
> local import_dbms_db import_dbms_user md5
>
> I still need that - correct? And I will need to have another entry
> specifying the ip addr of the machine to connect from if I am connecting
> from a different machine?
Yes. I would suggest some time looking at:
http://www.postgresql.org/docs/9.3/interactive/auth-pg-hba-conf.html
The line you showed previously:
local import_dbms_db import_dbms_user md5
will only work for local connections.
To connect from a different machine you will need a host line.
>
> So to connect from Python scripts (using psycopg2) do I need to specify the
> database to connect to as well?
Yes.
>
> And if that python script is running from a different machine the ip addr of
> that machine needs to be in the pg_hba.conf?
Yes.
>
> I ask as this is not connecting for me right now but I will check on the
> psycopg forum as well.
>
> Just wanted to confirm.
>
> Thank you for your help.
>
> Mono
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Trying-to-create-DB-user-to-import-some-data-tp5772568p5772622.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | mdr | 2013-09-27 18:05:23 | Re: Trying to create DB / user to import some data |
Previous Message | mdr | 2013-09-27 16:26:17 | Re: Trying to create DB / user to import some data |