How can I start PostgreSQL on Windows?

后端 未结 8 719
一生所求
一生所求 2020-11-29 18:24

I have installed Postgresql on my Windows 10 PC. I have used the pgAdmin II tool to create a database called company, and now I want to start the database server running. I

相关标签:
8条回答
  • 2020-11-29 19:06

    After a lot of search and tests i found the solution : if you are in windows :

    1 - first you must found the PG databases directory execute the command as sql command in pgAdmin query tools

    $ show data_directory;
    

    result :

    ------------------------
    - D:/PG_DATA/data      -
    ------------------------
    

    2 - go to the bin directory of postgres in my case it's located "c:/programms/postgresSql/bin"

    and open a command prompt (CMD) and execute this command :

    pg_ctl -D "D:\PSG_SQL\data" restart
    

    This should do it.

    0 讨论(0)
  • 2020-11-29 19:06

    Remove Postmaster file in "C:\Program Files\PostgreSQL\9.6\data"

    and restart the PostgreSQL services

    0 讨论(0)
提交回复
热议问题