Getting Postgresql Running In Mac: Database “postgres” does not exist [closed]

时光毁灭记忆、已成空白 提交于 2020-01-14 07:55:19

问题


I followed these instructions to get postgresql running on mac. Note that I am using Homebrew to install, and the current version installable through brew is 9.2.1, so I changed the version numbers in the instructions here: http://rails3hub.blogspot.com/2012/02/install-postgresql-9-on-os-x.html

Everything went swimmingly, but I can't get into psql to create dbs and whatnot. if I try psql i get psql: FATAL: database "myusername" does not exist

if i try psql -U root i get psql: FATAL: role "postgres" does not exist

if i try to follow the instruction in the blog to use pgAdmin as my postgres console, eg psql -d postgres < /usr/local/Cellar/postgresql/9.2.1/share/postgresql/extension/adminpack--1.0.sql i get the same role "postgres" does not exist error.

I have no clue how to get this up and running, I simply want to get into psql just as I would mysql -U root, create a db, and get started with a site.

Anybody have any advice? I can post more information, and I'm on Mac OSX fyi.

来源:https://stackoverflow.com/questions/13515834/getting-postgresql-running-in-mac-database-postgres-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!