Postgresql run by admin user is not allowed

Win7. Postgres 9.3.

Every time I type "postgres" in cmd, I get this error.

I created a new account without administrator rights and with "Login" rights and with the correct access rights to directories on postgres / data, then I set this account as "Login" in the services menu, but I'm all still get the same error.

update2017: I never found a solution for this.

+4
source share
3 answers

For windows, do the following:

  • Run cmd.exe (administrator as is)
  • Add postgres user: net user postgres your_password /add
  • Run cmd.exe using the new postgres account: runas /user:postgres cmd.exe
  • , "whoami
  • postgres.
+4

, Postgres "" Postgres Windows.

9.x Postgres Windows . "".

Postgres ( ),

net start postgresql-9.3

( )

Windows, Postgres pg_ctl.exe, postgres.exe. pg_ctl.exe .

Postgres :

pg_ctl -w -D c:\Path\To\The\DataDirectory

, , .

/ Windows , pg_ctl:

pg_ctl register -N "postgresql-9.3" -D c:\Path\To\The\DataDirectory

.

+2

, Postgres , . postgres. :

, PostgreSQL root . , , su postgres -c '...'.

0

Source: https://habr.com/ru/post/1545478/


All Articles