Postgres issue
Posted by Ninja Space Content on Tuesday, May 18, 2021 Under: postgres
In : postgres
Tags: postgres psql issue psql: error: could not connect to server:
psql: error: could not connect to server: could not connect to server:
brew install postgres
To have launchd start postgresql now and restart at login:
brew services start postgresql
so, I copied and pasted brew services start postgresql
psql
in my terminal and it was giving me this error: psql: error: could not connect to server: FATAL: database "******injaspace" does not exist. createdb
in the terminal and it looks like my old databases were wipe out. So in order to get my existing database to work again like it did a couple of weeks ago, I had to create the database again so I entered:CREATE DATABASE roses;
because roses was what I called my database. So I went back to my project in Visual Studio Code, started the server and voila, the error went away. I seeded my data and it is back now. This took me a good 45 minutes to debug. Hope it'll help you.In : postgres
Ninja Space Content |
California |
I have been building simple websites on my own since 2008 and currently run several websites at the moment, including this one. I used to be an account manager for an affiliate/e-commerce company, helping affiliates grow their sales so I have some knowledge on the business side and client side of affiliate marketing. During the Covid-19 pandemic, I completed a JavaScript coding bootcamp and graduated in Dec 2020. I've been working as a contractor for a few software companies ever since. |