我正在尝试为django项目创建一个数据库,我收到以下错误:
(blog-venv)vagrant @ precise64:/ vagrant/django_projects/microblog $ createdb微博createdb:数据库创建失败:ERROR:权限被拒绝创建数据库
我在vagrant/virtualbox环境中工作.
请帮忙.
谢谢.
如何让自己成为postgresql的超级用户?
我一直在尝试创建一个数据库,并且我不断收到以下错误:
createdb:数据库创建失败:错误:拒绝创建数据库的权限
我猜这是因为我不是超级用户,但我不知道什么是错的.这是我做的:
> sudo su postgres
> postgres@precise64:/xxx/xxx/projectfile$createuser -P
> Enter name of role to add: vagrantUser
> Enter password:
> Enter it again:
> Shall the new role be a superuser? (y/n) y
> postgres@precise64:/vagrant/django_projects/mblog$ psql -U vagrantUser template1
> psql: FATAL: Peer authentication failed for user "vagrantUser"
> postgres@precise64:/vagrant/django_projects/mblog$ exit
> (venv)vagrant@precise64:/vagrant/project$:psql template1
> template1 =# \q
> (venv)vagrant@precise64:/vagrant/project$:createdb mydb
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
createdb:数据库创建失败:错误:拒绝创建数据库的权限
请帮助