Home > Mobile >  psql crash: No such file or directory on m1 Mac
psql crash: No such file or directory on m1 Mac

Time:05-02

enter image description hereI was coding and suddenly my mac froze, I couldn't really do much and I force shutdown my mac and after restarting my code won't run saying it can't connect to the database. I checked if psql had any issue and this error message pops up. "psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory. Is the server running locally and accepting connections on that socket?" I tried everything to fix even trying to reinstall psql and nothing works. I found a tutorial online saying to check the /usr/local/var/postgres and deleting ostmaster.pid. But I can't find that file anywhere. My /usr/local is also a bit different, I don't have these files var/postgres. I'm freaking out rn :'(

CodePudding user response:

Try checking the environment variables on your pc and check to see if psql is in the path. this make fix the issue

CodePudding user response:

Nvm just fixed it, the file is under homebrew. I deleted it and now everything works again!

  • Related