LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 873|回复: 3

postgresql的数据库用户帐号问题

[复制链接]
发表于 2006-9-20 01:29:19 | 显示全部楼层 |阅读模式
我在suse10下安装了用rpm包安装了postgresql8.0.3。并创建一用户,该用户的默认group设定为postgres。但试图用该用户createdb时提示错误:
createdb: could not connect to database tempelate1: FATAL:  user "joe" does not exist
该作何解?请各位赐教!谢谢
发表于 2006-9-20 14:25:26 | 显示全部楼层
这是对你认证的时候失败了。你先su到root,然后su到postgres用户。(这样就不必输入这个用户的密码)。
然后创建数据库即可。

或者你指定下面的选项。
Connection options:
  -h, --host=HOSTNAME          database server host or socket directory
  -p, --port=PORT              database server port
  -U, --username=USERNAME      user name to connect as
  -W, --password               prompt for password
回复 支持 反对

使用道具 举报

发表于 2006-9-20 14:27:52 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-21 11:24:03 | 显示全部楼层
谢谢指教!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表