Learn SQL by Building a Student Database: Part 1 - Build a Student Database: Part 1

Tell us what’s happening:

I cannot connect to my database or psql from the terminal. I have been trying everyday for the last 3 weeks or so, but the the problem persists. All psql commands give out the error in the image below.

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0

Challenge Information:

Learn SQL by Building a Student Database: Part 1 - Build a Student Database: Part 1

I ran the lesson locally with docker, the problem persisted, but $sudo service postgresql start fixed the problem for me. I don’t know if it works all the time.

In the freecodecamp website (online session), there was an error when entering the above command, a file was not supposed to be run as root ( I forgot which one ), changing the owner of the file to the user “postgres” allowed me to restart the postgresql service without any errors (I don’t know why that works). However, I never got to running the lesson because codeRoad didn’t run no matter how many times I restarted the extension from the command palette.