osx - Postgresql.app user database deleted. How to recreate? -
i'm developing ruby on rails app use on heroku , want use postgresql.app
locally development environment (mostly play rails 4.0's new array attributes.) had installed postgresql.app while ago when playing around it, uninstalled , deleted user database created. i've reinstalled app, tries connect database before it'll anything, including allowing me psql @ command line.
if use psql @ command line, this:
psql: fatal: database "bcarr" not exist
logout
any suggestions how reset app's settings can recreate initial user db, or how can recreate db?
many in advance help!
normally on installation postgres.app
creates database , username matches os username (and has db superuser privileges). in case of reinstall, seems may end database missing.
however if username still there , still superuser, it's still possible connect template1
, issue administration commands such create database
, create user
.
the command simply: psql -d template1 -u username
, -u username
being optional if it's same os user.
Comments
Post a Comment