Win10下載安裝PostgreSQL 11.1


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

Installation Directory:D:\Program Files\PostgreSQL\11
Data Directory:D:\data\PostgreSQL\data
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 Files\PostgreSQL\11\bin添加進環境變量Path中。
然后在命令行執行:

initdb.exe -D D:\data\PostgreSQL\data -E UTF8

然后執行如下命令啟動PostgreSQL服務器:

pg_ctl -D D:\data\PostgreSQL\data -l D:\data\PostgreSQL\logfile.txt start

在命令行執行

psql postgres

進入psql客戶端的命令行,執行如下命令創建一個名為root密碼為password的超級用戶:

create user root with superuser password 'password';

然后使用DBEaver連接本地Postgres服務器,連接成功。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM