在Cygwin中启用Postgresql

前端之家收集整理的这篇文章主要介绍了在Cygwin中启用Postgresql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我安装了Perg和 Postgresql包的Cygwin.

然后输入:

/usr/bin/cygserver-config (This will install the service)

然后输入:

net start cygserver(This starts the service)

接下来我需要在Cygwin中启用Postgresql,所以我尝试了下面提到的命令:

cygrunsrv -S cygserver

initdb -D /usr/share/postgresql/data

pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log

createdb

psql

我收到一个错误

$initdb -D /usr/share/postgresql/data
-bash: initdb: command not found

$pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log
-bash: pg_ctl: command not found

有人可以告诉我如何做对.

Postgresql initdb和pg_ctl可执行文件位于/usr/sbin下.

我猜/ /usr/sbin不在你的PATH设置上.添加它应该可以解决问题.

我使用一个启动/停止脚本,我将其保存在名为pg的$HOME / bin下.这是gist.

原文链接:https://www.f2er.com/postgresql/192170.html

猜你在找的Postgre SQL相关文章