How to start Postgres server? [closed]

谁都会走 提交于 2019-12-02 16:43:56
Andrew Lazarus

You haven't started the Postgres server. Some of the dmg packages for Postgres set it to run as a service on startup. But not however you did the install.

You need to init a data directory, start postgres, and then go from there.

initdb /some/directory # just do this ONCE
pg_ctl -D /some/directory start # many other options, e.g. logging, available here
psql postgres

You can set an environment variable for the data directory and you won't need the -D flag later. You can look that up later.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!