Re: Connecting to postgresql with pdadmin III
От | Raymond O'Donnell |
---|---|
Тема | Re: Connecting to postgresql with pdadmin III |
Дата | |
Msg-id | 4F182B41.6050607@iol.ie обсуждение исходный текст |
Ответ на | Connecting to postgresql with pdadmin III ("David M. Gullever" <david.gullever@web.de>) |
Список | pgadmin-support |
On 19/01/2012 12:57, David M. Gullever wrote: > This explains the Host field but not the Name field. Perhaps those > that wrote this help document thought that this was obvious but IS > IT ??? Up till now I thought I was trying to connect to a Database on > my local machine but perhaps pgadmin III requires me to connect to > the server first (WOULD THAT Just to clarify a small point here - there's no such thing as connecting to a PostgreSQL database without first connecting to a server. Clients don't have any access to the data on disk; the server always does the serving. :-) > BE POSTMASTER ON LOCALHOST ???) and then the database. In any case > the help-documentation does not deal with these problems so guys > like me have to ask in forums. > > I have changed my pg_hba.conf to look like this (# IPv4 local > connections: now switched to trust did not solve the password > problem) > > # Database administrative login by UNIX sockets local all postgres > ident sameuser > > # TYPE DATABASE USER CIDR-ADDRESS METHOD # > "local" is for Unix domain socket connections only local all all > ident sameuser > > # IPv4 local connections: host all all 127.0.0.1/32 trust > > # IPv6 local connections: host all all ::1/128 > md5. > > So my pgadmin questions at this stage are... 1. Do I have to Add a > server before adding a database (and what would be the name of the > Server) Yes, you do. The "name" field is up to you - it's just a label in PgAdmin used to identify the server in the list. > 2. Is a password for user postgres mandatory (will pgadmin III fail > if no password ???) This depends on (i) how authentication is set up in Postgres, and (ii) how you are connecting. According to the above pg_hba.conf, if you connect via a Unix socket ("local" rules), Postgres will use ident for authentication; whereas if you connect over TCP/IP ("host" rules) it will just let you straight in without any authentication ("trust"). Remember too that the order of rules in pg_hba.conf is important - the first matching rule will take effect. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
В списке pgadmin-support по дате отправления: