Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding psql --username and dbname #558

Closed
jillawar opened this issue Jan 3, 2022 · 7 comments
Closed

Regarding psql --username and dbname #558

jillawar opened this issue Jan 3, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@jillawar
Copy link

jillawar commented Jan 3, 2022

Describe the bug
This doesn't seems to be bug, but :
when I first logged into psql using > psql --username=freecodecamp dbname=postgres , it was successful
but I closed terminal and then tried to do the same i.e to login I type the exact above line.. it is throwing error (attached the image)

Expected behavior
I just want to login to it and start learning the course "Learn Relational Databases by Building a Mario Database".

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Platform: Windows,
  • OS: Windows 10
  • Version : 10.0.19043

VSCode (please complete the following information):

  • Version : 1.63.2

Node (please complete the following information):

  • Version [e.g. 12.4]

Git (please complete the following information):

  • Version [e.g. 2.24.1]

Additional context
Add any other context about the problem here.
Capture

@jillawar jillawar added the bug Something isn't working label Jan 3, 2022
@jillawar jillawar closed this as completed Jan 3, 2022
@jillawar
Copy link
Author

jillawar commented Jan 3, 2022

i closed this has the issue is resolved..
What I did was to restart the same project using URL. and when I started the lessons, it logged in.

@ShMcK
Copy link
Member

ShMcK commented Jan 4, 2022

Interesting, thanks for the tutorial feedback. I'll ping @moT01 for awareness.

@jillawar
Copy link
Author

jillawar commented Jan 4, 2022

Thank you, Sir.

@jillawar
Copy link
Author

jillawar commented Jan 4, 2022

sir, I'd like to reopen the issue..
Cause it appears I can't continue from where I left but have to start over again OR complete the course in one go..
Plesae look into the issue.
Thank you.

@jillawar jillawar reopened this Jan 4, 2022
@jillawar
Copy link
Author

jillawar commented Jan 5, 2022

Hello Sir,
It appears if we enter the below code (which i found in the course URL), then we need not restart the course, we can continue from where we left by using the starting code : psql --username=freecodecamp dbname=
The code is :
sudo touch ~/pg.log
sudo chmod 777 ~/pg.log
sudo touch ~/queryResults.log
sudo chmod 777 ~/queryResults.log
sudo cp ~/project/.freeCodeCamp/pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
sudo cp ~/project/.freeCodeCamp/postgresql.conf /etc/postgresql/12/main/postgresql.conf
sudo cp ~/project/.freeCodeCamp/.bashrc ~
sudo cp ~/project/.freeCodeCamp/.psqlrc ~
sudo chown -R postgres:postgres /var/lib/postgresql/12/main
sudo service postgresql stop
cd .freeCodeCamp && npm install
sudo service postgresql start
.........
This was amazing to find out, I'm not sure if I can close this issue. Thank you.

@moT01
Copy link
Contributor

moT01 commented Jan 5, 2022

Thanks for reporting this @jillawar. If you are having problems with a tutorial, I recommend checking this thread on the freeCodeCamp forum to see if there's an answer there. If you don't see one, you can post a message there and someone may be able to help. If it turns out to be a bug with the tutorial, you (or someone) can then create an issue on the freeCodeCamp repo.

This actually may be something that can be fixed on the CodeRoad end @ShMcK. These are the startup commands. When closing and trying to continue a tutorial, they don't get run. Pretty sure they used to in an earlier version of CodeRoad. For most things, that's not a problem - the files/config still seem to be there from the initial load. A quick test shows that the only one here that is an issue (I believe) is the sudo service postgresql start command. When VSCode gets closed, the service is stopped. One thing I did on another tutorial, that I may do on all of them, is move some of the startup commands to the reset commands area and run that on startup. Then, a user can hit the reset button to restart the service (and setup whatever other config) and continue.

Do you mind closing this issue again @jillawar? I will create a new one that is more focused if needed, or perhaps there's a way I can fix this within the tutorial. Thanks. Oh, and nice job figuring out how to continue 👍

@jillawar jillawar closed this as completed Jan 5, 2022
@jillawar
Copy link
Author

jillawar commented Jan 5, 2022

I've closed it.. Yes thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants