Django视频系列入门 - Postgres数据库创建问题

时间:2014-05-28 19:42:02

标签: django postgresql

我正在使用http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/跟随流浪者运行的virtualenv,当我输入时:

$ sudo su postgres

我被要求输入密码:

$ [sudo] password for postgres: 

有没有人有关于如何找到密码的任何提示?我很困惑,我甚至收到了这个密码请求,因为之前发生了这样的事情:

createuser: creation of new role failed: ERROR: role "vagrant" already exists
postgres@precise64:/vagrant/projects/microblog$ createuser -P
could not change directory to "/vagrant/projects/microblog"

(blog-venv)vagrant@precise64:/vagrant/projects/microblog$ createdb microblog
createdb:     database creation failed: ERROR: permission denied to create database

(blog-venv)vagrant@precise64:/vagrant/projects/microblog$ sudo su postgres     

postgres@precise64:/vagrant/projects/microblog$ dropuser vagrant
could not change directory to "/vagrant/projects/microblog"
postgres@precise64:/vagrant/projects/microblog$sudo -u postgres psql postgres is not in the sudoers file. This incident will be reported.

postgres@precise64:/vagrant/projects/microblog/microblog$ sudo su postgres
[sudo] password for postgres: 

最终我试图让createdb microblog在Postgres中为我创建一个数据库,但我遇到了这些奇怪的密码请求问题。

0 个答案:

没有答案