我已经安装的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,会发生什么? –