frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

👍 psql downloaded and used in this app no prob. 👎 psql command not found [10:07pm] #270

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: deploy. need psql CLI for heroku backend && azure front end.

error:

psql command is needed to run the heroku deployment ( if I understand correctly )

proposed approach: chatGPT leading me to bashrc, when zshrc is the file needed. Have to tread carefully and not do anything nonrevertable like mess up the zshrc file and cause other things not related to psql to break. not sure.

frankcollins3 commented 1 year ago

which psql command not found

Screen Shot 2023-07-04 at 10 10 35 PM

Screen Shot 2023-07-04 at 10 12 04 PM

Screen Shot 2023-07-04 at 10 11 56 PM

Screen Shot 2023-07-04 at 10 11 48 PM

[10:10pm]

frankcollins3 commented 1 year ago

# brew install pgcli: Screen Shot 2023-07-04 at 10 16 25 PM

# psql Screen Shot 2023-07-04 at 10 17 00 PM

[10:15pm]

frankcollins3 commented 1 year ago

this is the path to the postgres folder in the application pictured above. That working path doesn't do anything to zshrc 👎 export PATH="/Applications/PostgreSQL14/bin:$PATH"

ran this statement to find it but get this error: 👎 sudo find / -name psql

Screen Shot 2023-07-04 at 10 27 15 PM

[10:27pm]

frankcollins3 commented 1 year ago

👍 export PATH="/Library/PostgreSQL/14/bin:$PATH" this enabled the psql command and brought about another problem:

👎 somehow the password to login during computer start is understood to be incorrect.

~ psql

Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" zsh: command not found: ➜ ➜ ~ psql Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" ➜ ~ psql Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" ➜ ~ ➜ ~ psql

Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" zsh: command not found: ➜ ➜ ~ psql Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" ➜ ~ psql Password for user medium: psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "medium" ➜ ~

[10:33pm]

frankcollins3 commented 1 year ago

unbelievably yet expectedly so the password works for logging into sudo but not for the psql command

Screen Shot 2023-07-04 at 10 37 01 PM [10:38pm]

frankcollins3 commented 1 year ago

can see the change of password work, then: postgres = # Screen Shot 2023-07-04 at 10 38 39 PM

successful change of password and automatic redirect into the psql cli in iterm2 postgres = #

then the password doesn't work.

[10:39pm]

frankcollins3 commented 1 year ago

to be honest if psql is being this buggy that the password is wrong unless i use sudo: I might copy this code to next.js because I foresee more problems with heroku if psql cli is needed and it's this unstable just to log into psql from the terminal which is apparently needed for heroku

Screen Shot 2023-07-04 at 10 40 22 PM

besides the fact that this seems wildly unstable and unpredictable, success achieved: \c fill_cont; () -----> SELECT * FROM data; ---------> returns same data as pictured above in blue psql shell

Screen Shot 2023-07-04 at 10 41 24 PM

[10:40pm]

frankcollins3 commented 1 year ago

forgot this command: npx prisma db push

https://github.com/prisma/prisma/issues/10771