小编Col*_*sky的帖子

在 CMD 中从 windows 用户更改 postgreSQL 数据库用户

我最近在 Windows 7 上安装了 PostgreSQL,每次我尝试使用 CMD 执行 SQL 命令时,我都会收到此错误

createdb: could not connect to database template1: FATAL: password authentication failed for user "R-61"

其中 R-61 是我的 Windows 机器用户名。

这是我如何在 pgSQL 中使用 CMD

  • 首先我 cd 到 pgSQL bin 文件夹 $ cd C:\xampp\pgsql\9.1\bin
  • 我尝试创建一个数据库 $ createdb NEWDATABASE
  • 我收到输入密码的提示。这是我感到困惑的地方,因为我不知道密码是什么。我已经尝试过我的窗口用户密码、postgres超级用户密码,但似乎都不起作用。这是我收到的错误信息 createdb: could not connect to database template1: FATAL: password authentication failed for user "R-61"

    有人知道这个问题的解决方案吗?我想将用户表单 R-61 更改为postgres超级用户会起作用,但我不知道该怎么做。

非常需要您的帮助。

postgresql

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

postgresql ×1