PostgreSQL: Why psql can't connect to server?

前端 未结 22 2167
情书的邮戳
情书的邮戳 2020-12-07 10:40

I typed psql and I get this:

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    con         


        
22条回答
  •  日久生厌
    2020-12-07 10:51

    So for me and my pals working on a Node.js app (with Postgres and Sequelize), we had to

    1. brew install postgresql (one of us was missing postgres, one of us was not, and yet we were getting the same error msg as listed above)

    2. brew services start postgresql **** (utilize Homebrew to start postgres)

    3. createdb

    4. node_modules/.bin/sequelize db:migrate

    5. npm start

提交回复
热议问题