Closed frankcollins3 closed 1 year ago
which psql command not found
[10:10pm]
# brew install pgcli:
# psql
[10:15pm]
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
[10:27pm]
👍 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]
unbelievably yet expectedly so the password works for logging into sudo but not for the psql command
[10:38pm]
can see the change of password work, then: postgres = #
successful change of password and automatic redirect into the psql cli in iterm2 postgres = #
then the password doesn't work.
[10:39pm]
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
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
[10:40pm]
forgot this command: npx prisma db push
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.