我已經安裝的PostgreSQL服務器配置文件,但是當我在windows CMD運行命令postgres
Postgres的不知道去哪裏找
它提供了以下錯誤:
即使運行命令 後postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
initdb postgres
作爲保持similar Issuepostgres -D C:\Program Files\PostgreSQL\data\
給了我下面的輸出:
2016-09-28 15:04:57 PDT LOG: could not bind IPv6 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2016-09-28 15:04:57 PDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2016-09-28 15:04:57 PDT LOG: could not bind IPv4 socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
2016-09-28 15:04:57 PDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2016-09-28 15:04:57 PDT WARNING: could not create listen socket for "*"
2016-09-28 15:04:57 PDT FATAL: could not create any TCP/IP sockets
2016-09-28 15:04:57 PDT LOG: database system is shut down
你究竟在做什麼?你應該使用'pg_ctl'來啓動Postgres服務器。做**不**使用'postgres'。 –
我想將數據庫連接到我的django應用程序,所以我需要一些數據庫以及db中的用戶 –
如果您使用圖形安裝程序安裝了Postgres,它將創建一個將自動啓動的Windows服務。你有Postgres的Windows服務嗎?爲什麼你認爲你需要手動運行'postgres.exe'?如果使用'psql'連接到Postgres,會發生什麼? –