Postgres - FATAL: database files are incompatible with server

后端 未结 7 1984
半阙折子戏
半阙折子戏 2020-12-07 07:20

After restarting my MacBook Pro I am unable to start the database server:

could not connect to server: No such file or directory
Is the server running local         


        
7条回答
  •  难免孤独
    2020-12-07 07:59

    If you are looking for the nuclear option (delete all data and get a fresh database), you can do:

    rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8

    and then you'll need to rake db:setup and rake db:migrate from your Rails app to get setup again.

提交回复
热议问题