unable to connect to server for Postgres

前端 未结 7 1890
刺人心
刺人心 2021-02-02 09:48

I have a problem to connect server for Postgres after I updated my windows.Before I update there is no problem to open the database. My database in Postgres also gone. When I wa

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 09:57

    I got this error message when I moved my database to another computer.

    I also got some error messages when starting the server first with

    pg_ctl -D /wherever/your/database/is start

    which were

    pg_ctl: another server might be running; trying to start server anyway server starting

    DETAIL: File "/wherever/your/database/is/PG_VERSION" does not contain valid data.

    HINT: You might need to initdb.

    In my case rather than running initdb this command actually fixed the issue

    pg_ctl -D /wherever/your/database/is restart
    

提交回复
热议问题