Обсуждение: Install as program

Поиск
Список
Период
Сортировка

Install as program

От
"Brian J. Erickson"
Дата:
When PostgreSQL is installed as a program,
the install does not ask for a user name or password.

How does someone connect to the Database Server,
without a user name or password,
especially, if the database server has no accounts?

BTW: I did "start database" and the database server
         was running.

Thanks
Brian


Re: Install as program

От
"Magnus Hagander"
Дата:
> When PostgreSQL is installed as a program, the install does
> not ask for a user name or password.

Correct. This is because it doesn't do an initdb. You are required to do
this manually


> How does someone connect to the Database Server, without a
> user name or password, especially, if the database server has
> no accounts?

These are set when you run "initdb". I beleive if you don't specify
anything at all, you will get:
1) The same username as the windows username used to run initdb
2) No password
3) Trust authentication

>
> BTW: I did "start database" and the database server
>          was running.

If you did this without doing initdb, it means you had an old data
directory aronud. In which case the password will be whatever you
assigned that installation.


//Magnus

Re: Install as program

От
"Merlin Moncure"
Дата:
> When PostgreSQL is installed as a program,
> the install does not ask for a user name or password.

The .msi installer prompts you for the root account name and password
(usually postgres).  Logging onto the database is possible without a
password if the terminal you are logging in from (127.0.0.1) uses the
'trust' authentication method in pg_hba.conf.  Open this file and read
it over until you understand it completely.

> How does someone connect to the Database Server,
> without a user name or password,
> especially, if the database server has no accounts?


The database is always installed with an account. I'd suggest going
through the install process once again...don't confuse the database root
account with the NT user account the database runs under.

Merlin