New Mac Trial - Can't Connect to DB

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

New Mac Trial - Can't Connect to DB

Postby User1 » Fri Jan 22, 2010 1:41 pm

Hello,

I've found some similar problems on 2p2 and here but all of the troubleshooting seems to be windows oriented and I don't know how to deal with it on OS X.

I just installed PT 3 for the first time ever today and when I lauch the app it brings up PostgreSQL with all of the default settings and then I press connect and get this message:

Unable to Connect

Unable to connect to this database. Please check the configuration.

Is this a firewall problem? I am connected to a wireless router (by a wire) which has wireless security, but I don't know if that affects anything regarding this. As is probably apparent, I know very little about networks and everything.

Thank you
User1
 
Posts: 8
Joined: Fri Jan 22, 2010 1:24 pm

Re: New Mac Trial - Can't Connect to DB

Postby kraada » Fri Jan 22, 2010 2:19 pm

Did you install the Full Installer for PT3? Do you have PostgreSQL in your Applications folder?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: New Mac Trial - Can't Connect to DB

Postby User1 » Fri Jan 22, 2010 2:31 pm

Yes it is in the Applications folder.

Sorry I missed this before - what do I need to run to get it going?
User1
 
Posts: 8
Joined: Fri Jan 22, 2010 1:24 pm

Re: New Mac Trial - Can't Connect to DB

Postby kraada » Fri Jan 22, 2010 3:12 pm

Try starting the PostgreSQL server, then starting up PT3 - the defaults are server localhost, port 5432, user postgres and password dbpass.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: New Mac Trial - Can't Connect to DB

Postby User1 » Fri Jan 22, 2010 3:17 pm

Okay I ran Start Server, then opened PT3 and had the same message - same defaults.
User1
 
Posts: 8
Joined: Fri Jan 22, 2010 1:24 pm

Re: New Mac Trial - Can't Connect to DB

Postby kraada » Fri Jan 22, 2010 4:23 pm

In Applications there should be a SQL Shell link; can you open the SQL shell successfully and connect?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: New Mac Trial - Can't Connect to DB

Postby User1 » Sat Jan 23, 2010 2:38 am

When I open the SQL Shell - it opens two terminal windows with the following text:

Last login: Fri Jan 22 13:26:56 on ttys001
/Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
xxxxxxs-mac-pro:~ HomeFolder$ /Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
Server [localhost]:





and in the other:


Last login: Fri Jan 22 13:26:56 on ttys001
xxxxxxs-mac-pro:~ HomeFolder$



I x-ed out my name for privacy.

When I try to run Start Server and then PT 3 I get the message from Start Server - "The command exited with a non-zero status."
User1
 
Posts: 8
Joined: Fri Jan 22, 2010 1:24 pm

Re: New Mac Trial - Can't Connect to DB

Postby WhiteRider » Sat Jan 23, 2010 5:40 am

In the first one of those press enter at the first 4 prompts to accept the defaults and see if it connects.
It should look something like this:
Screen shot 2010-01-23 at 09.38.12.png
(18.27 KiB) Downloaded 1577 times
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: New Mac Trial - Can't Connect to DB

Postby User1 » Sat Jan 23, 2010 11:48 am

Okay - now this happened -

Last login: Sat Jan 23 10:47:11 on ttys000
xxxxxxs-mac-pro:~ HomeFolder$ /Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
psql: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?

Press <return> to continue...
logout

[Process completed]
User1
 
Posts: 8
Joined: Fri Jan 22, 2010 1:24 pm

Re: New Mac Trial - Can't Connect to DB

Postby kraada » Sat Jan 23, 2010 11:53 am

That means the server really isn't running.

Try editing the postgresql.conf file and setting port to 5433, then starting it and attempting to attach to it on that port and see if it works better for you.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 4 guests