Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

After trying to install Postgres using Postgres.app and EnterpriseDB, I decided to re-install it using Homebrew (As I got some problems connecting to database).

PYTHON=/usr/local/bin/python brew install postgresql
initdb -A trust /usr/local/var/postgres
initdb /usr/local/var/postgres -E utf8


mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.3.2/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

I am working to create a database using Postgres. Whenever I try to create database using command line, I got this problem :

MACBOOK:~ macbook$ postgres -D /usr/local/var/postgres

LOG: could not bind IPv6 socket: Address already in use HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. LOG: could not bind IPv4 socket: Address already in use HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. LOG: could not bind IPv6 socket: Address already in use HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. WARNING: could not create listen socket for "localhost" FATAL: could not create any TCP/IP sockets

Or I face this problem

Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Any ideas to solve this problem?

share|improve this question
    
Tip: use the {} button to format logs, etc. If you use the quote button (>) they get wrapped and become illegible. –  Craig Ringer Jan 20 at 2:12
    
Also: If you have a problem with software, installing more software is usually not the best approach. It just makes everything more complicated because you have TWO messes to deal with, not just one. In this case I'd say your old PostgreSQL install is still using port 5432. –  Craig Ringer Jan 20 at 2:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.