Error when rerunning mario database lesson - Build a Mario Database

Tell us what’s happening:

I only completed half of the tutorial but the next day when I opened it again I got the following error:
camper: /project$ psql --username=freecodecamp --dbname=postgres.
psql: error: connection to server at “127.0.0.1”, port 5432 failed: FATAL: role “freecodecamp” does not exist.

Challenge Information:

Learn Relational Databases by Building a Mario Database - Build a Mario Database

I’m having the same issue. I was able to resume the course once successfully, but it looks like resuming is very hit or miss.

The unfortunate answer is you likely have to start over in a new Gitpod instance. It’s kind of irritating, I wish I knew that the course would error out if you stopped and resumed it.

Oddly enough I’ve been able to resolve this issue by opening the GitPod workspace in the browser, running the psql command to connect to the database, then going to the hamburger menu and selecting Open in VS Code. After this I’m able to successfully connect to the database from VS Code

Exactly! I tried several ways to make the connection. For now this is the most suitable solution. Thanks for spreading the word!