ITeye博客

postgreSQL安装windows10上的问题处理

Cash · 2019-02-25 13:51 · 数据库 · Markdown

采用administrator权限安装postgreSQL在windows10报错 Problem running post-install step.Installation may not complete correctly the database cluster initialisation failed.

原因安装过程无法创建postgresql用户,无法初始化数据库;

windows上创建postgres用户 C:\WINDOWS\system32>net user postgres postgres /add

1)创建目录data D:\Program Files\PostgreSQL\11>md data 2)移除administrator的data目录管理员权限 D:\Program Files\PostgreSQL\11>cacls data /e /t /r administrator 3)给postgres用户授权 D:\Program Files\PostgreSQL\11>cacls data /e /t /r postgres:c 4)初始化数据库(过程中输入口令) D:\Program Files\PostgreSQL\11\bin>initdb.exe -D ../data -E UTF-8 --locale=chs -U postgres -W 5)启动数据库 D:\Program Files\PostgreSQL\11\bin>pg_ctl -D ../data -l logfile start 6)注册postgreSQL作为windows服务 D:\Program Files\PostgreSQL\11\bin>pg_ctl.exe register -D "D:\Program Files\PostgreSQL\11\data"

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。