我最近在更新后在我的Ubuntu 8.04上重新安装了postgresql 8.3.使用过的EnterpriseDB包.我可以在本地连接到数据库,我看到系统数据库postgres但我无法配置它,因为我找不到配置文件.通过整个硬盘搜索,发现只有像pg_hba.conf.sample
postgres *.conf文件在哪里?
我已经安装了 PostgreSQL:
nix-env -iA nixos.postgresql
Run Code Online (Sandbox Code Playgroud)
现在当我使用 时psql,我得到:
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
Run Code Online (Sandbox Code Playgroud)
我必须添加一些东西/etc/nixos/configuration.nix吗?
更新
我尝试像此链接那样进行操作(即,将其安装在nix-shell而不是安装在中nix-env),但我仍然遇到相同的错误:
$ nix-shell --pure shell.nix
done
server started
$ psql
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on …Run Code Online (Sandbox Code Playgroud) 我到处都在搜索这个,但搜索了一个半小时后我没有找到任何相关的东西。
如何连接到我的 Google 计算引擎上的数据库?即我想使用笔记本电脑上的 pgadmin3 连接到在我的 google 计算引擎上运行的 postgres 服务器。
这可能吗?如果是这样我该怎么办?
提前致谢!