Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted:

目录

一、PostgreSQL下载安装

二、PostGIS工具软件下载

三、测试:使用paAdmin4管理数据库

解决The pgAdmin 4 server could not be contacted:


一、PostgreSQL下载安装

(1)这里使用 EnterpriseDB 来下载安装,EnterpriseDB 是全球唯一一家提供基于 PostgreSQL 企业级产品与服务的厂商。

下载地址:Download PostgreSQL。

根据自己的电脑选择合适的版本进行下载(此处我下载13.8版本)

图片[1] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

等待下载完成,

图片[2] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[3] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(2)下载完成之后,双击下载安装包,开始安装,

图片[4] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

此处可以修改安装路径,

图片[5] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

选择安装组件,一定要注意安装postgres时勾选掉pgAdmin4!!!!

图片[6] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

设置数据库路径,

图片[7] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

设置超级用户的密码,

图片[8] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

设置端口号,可以直接用默认5432就行,

图片[9] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

直接点 Next,

图片[10] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[11] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[12] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(3) 开始安装,

图片[13] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(4)去掉勾选,直接点 Finish,

图片[14] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

二、PostGIS工具软件下载

(1)打开官网下载,

下载地址为Index of /postgis/windows/pg13/

图片[15] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

这里要与自己下载安装的postgresql的版本一致,这里是13版本,所以这里的pg也是13版本,两者必须配套。

等待下载完成,

图片[16] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(2)双击安装包,开始安装PostGIS,

图片[17] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[18] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

安装同时默认创建空间数据库,

图片[19] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

安装路径,

图片[20] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

设置PostGIS用户名密码,默认端口:5432,

图片[21] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

设置空间数据库名,

图片[22] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

开始安装,

图片[23] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[24] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[25] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(3)点击close。

三、测试:使用paAdmin4管理数据库

解决The pgAdmin 4 server could not be contacted:

安装postgresql后,使用自带的pgAdmin 4 访问数据库,如图所示,

图片[26] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

访问失败,出现错误【The pgAdmin 4 server could not be contacted】。

解决方法:安装postgresql时,不安装自带的pgAdmin 4,

1.访问Download
下载最适配的安装包,单独安装pgAdmin 4(一定要注意版本)。

图片[27] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[28] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL 等待下载完成,

图片[29] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

2.下载后直接点击安装,下一步即可。

图片[30] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[31] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[32] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[33] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[34] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[35] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[36] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[37] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

点击finish。

3.进入路径 c:\Users\your_name\AppData\Roaming\pgAdmin 之内的删除所有文件和文件夹,

图片[38] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

4.启动时,先停掉postgresql-x64-13服务,

图片[39] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

然后启动pgAdmin4,

图片[40] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

再重新启动postgresql-x64-13服务。

图片[41] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

问题解决。

(1)在开始菜单中找到pgAdmin 4,打开

图片[42] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(2) 打开pgAdmin 4之后,需要输入密码【之前安装时设置的密码:123456】,

图片[40] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

图片[44] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

(3)打开pgAdmin 4之后,发现该程序已经将本地安装的PostgreSQL数据库服务器列在了服务器列表中,将其选中然后选择右键菜单的”连接“命令,以超级用户postgres及安装过程为该用户设置的密码连接数据库服务器。连接以后,将列出该服务器中包含的内容,如下图所示,包含数据库、表空间和组角色等。

图片[45] - Windows下载安装 PostgreSQL和PostGIS工具,并解决The pgAdmin 4 server could not be contacted: - MaxSSL

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享