Getting Postgresql Running In Mac: Database “postg

2019-06-17 08:45发布

问题:

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.