How to check status of PostgreSQL server Mac OS X

前端 未结 7 1884
南旧
南旧 2020-12-04 06:52

How can I tell if my Postgresql server is running or not?

I\'m getting this message:

[~/dev/working/sw] sudo bundle exec rake db:migrate 
rake aborte         


        
7条回答
  •  無奈伤痛
    2020-12-04 07:48

    The simplest way to to check running processes:

    ps auxwww | grep postgres
    

    And look for a command that looks something like this (your version may not be 8.3):

    /Library/PostgreSQL/8.3/bin/postgres -D /Library/PostgreSQL/8.3/data
    

    To start the server, execute something like this:

    /Library/PostgreSQL/8.3/bin/pg_ctl start -D /Library/PostgreSQL/8.3/data -l postgres.log
    

提交回复
热议问题