加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Win10下载安装PostgreSQL 11.1

发布时间:2020-12-14 02:36:47 所属栏目:Windows 来源:网络整理
导读:下载地址:https://get.enterprisedb.com/postgresql/postgresql-11.1-1-windows-x64.exe Installation Directory: D:Program FilesPostgreSQL11 Data Directory: D:dataPostgreSQLdata Please provide a password for the database superuser (post

下载地址:https://get.enterprisedb.com/postgresql/postgresql-11.1-1-windows-x64.exe

Installation Directory:D:Program FilesPostgreSQL11
Data Directory:D:dataPostgreSQLdata
Please provide a password for the database superuser (postgres).
Password:password
Port:5432
Locale:[Default locale]

报错:

Problem running post-install step. Installation may not complete correctly
Failed to start the database server.

创建一个名为postgres的用户,密码设置为password,并且将其权限设置成了管理员。
然后卸载之前安装的所有PostgreSQL组件,重新安装。
Locale改成:C

还是有问题,卸载,重启。再次安装。依然失败。

参照这篇教程:http://www.voidcn.com/article/p-ujhdgeom-brr.html
首先将D:Program FilesPostgreSQL11bin添加进环境变量Path中。
然后在命令行执行:

initdb.exe -D D:dataPostgreSQLdata -E UTF8

然后执行如下命令启动PostgreSQL服务器:

pg_ctl -D D:dataPostgreSQLdata -l D:dataPostgreSQLlogfile.txt start

在命令行执行

psql postgres

进入psql客户端的命令行,执行如下命令创建一个名为root密码为password的超级用户:

create user root with superuser password ‘password‘;

然后使用DBEaver连接本地Postgres服务器,连接成功。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读