postgresql - 使用 pgAdmin 连接到 Postgres
问题描述
操作系统:macOS High Sierra
版本:10.13.6 (17G6030)
我正在阅读 Practical SQL 并且我正在尝试设置我的环境,但我遇到了以下问题。
- 我安装了 Postgres
- Ran sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
- 在本地安装 pgAdmin
- 当我打开 pgAdmin 时,即使我在 postgres 中列出了 3 个服务器,也没有列出任何服务器。
- 当我去连接服务器时,我输入了服务器名称和路径。但是当我输入路径时,我收到以下错误:
Unable to connect to server: could not connect to server: Not a directory
Is the server running locally and accepting connections on Unix domain socket /Applications/Postgres.app/Contents/Versions/12/bin/psql/.s.PGSQL.5432?
解决方案
我使用以下视频来学习如何创建数据库并将其从 postgres 连接到 pgAdmin