I’m halfway through the “Build a Database of Video Game Characters” course and took a break. This morning, I’m able to access the project through “Codespaces”, and it successfully loads my progress to where I left off yesterday.
Once I’m inside the terminal and attempt to connect to the
psql: error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
I’ve tried to use the following commands to reset the container…
cd /workspaces
ls
cd rdb-alpha
pwd
Cmd+Shift+P & Dev Containers: Rebuild Container (To rebuild the container).
There is a reset button there that you should click. Once it is done resetting the environment, close the terminal you are in and open a new one then retry the psql step.
(This question has been asked and answered many times in this forum. Please consider reading through other posts to help yourself faster in future)
Hello, I’m working on the Relational Database course locally using VS Code and the Dev Container setup.
I’m facing a connection issue: I’ve tried clicking the ‘Reset’ button and opening a new terminal, but I keep getting the same error when running psql --username=freecodecamp --dbname=postgres:
psql: error: could not connect to server: No such file or directoryIs the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?