2012-04-02 14 views
2

Mac OSX Lionでpostgresqlを設定することができません。私はbrewを使ってpostgresをインストールしましたが、デフォルトのインストール済みのpostgresがLionにあるので、それが問題かどうかわかりません。ここではサーバを起動しようとしていますが、動作するようですが、psqlにアクセスできない。私も "postgres"と呼ばれるユーザーを作成しましたが、私は正確に何をするのかは分かりません。Mac OSX Lionでpostgresqlを起動するときに問題が発生しました。

Superfly:~ James$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start 
    server starting 
    Superfly:~ James$ ps aux | grep postgres 
    postgres  18990 0.0 0.0 2435492 1044 s000 S  7:52PM 0:00.01 bash 
    root   18989 0.0 0.0 2446896 1848 s000 S  7:52PM 0:00.02 su postgres 
    James   19310 0.0 0.0 2434892 544 s001 S+ 8:16PM 0:00.00 grep postgres 
    Superfly:~ James$ psql -U postgres 
    psql: could not connect to server: No such file or directory 
     Is the server running locally and accepting 
     connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 

ここに私のコンピュータにpg_ctlとpsqlがインストールされています。

Superfly:~ James$ which psql 
/usr/local/bin/psql 
Superfly:~ James$ which pg_ctl 
/usr/local/bin/pg_ctl 

助けてください。

答えて

0

これを実行したユーザーはどれですか? Brewはインストール後に指示を出しますが、それらのコマンドを実行しましたか? pg_ctlpostgresユーザーとして実行する必要があります。私はなぜあなたがエラーメッセージを受け取っていないのかわかりませんが、データディレクトリを与える必要があります。

+0

ありがとうございます。私は最初にこれらのコマンドを見ていなかったので、これが始まりました。 – vaughanj10

関連する問題