Unable To Login To Database (postgres)

A special forum dedicated to our PT4 for Mac OS X users

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Unable To Login To Database (postgres)

Postby Herr_Someone » Thu Apr 24, 2014 3:49 pm

Hello

I've recently had a new hard drive and migrated my data over, however I think my postgreSQL installation is messed up. On opening PT4 I get the following error:
Screen Shot 2014-04-24 at 20.45.44.png
(46.25 KiB) Downloaded 1848 times

How can I check whether I need to reinstall postgreSQL?

Thanks
Herr_Someone
 
Posts: 62
Joined: Sun Aug 14, 2011 12:40 pm

Re: Unable To Login To Database (postgres)

Postby kraada » Thu Apr 24, 2014 4:17 pm

Just reinstalling PostgreSQL in the default location shouldn't cause problems on the Mac. Follow our uninstall/reinstall guide here and it will most likely get things working for you.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable To Login To Database (postgres)

Postby Herr_Someone » Thu Apr 24, 2014 4:21 pm

Ok I'll give that a go thanks.

The guide says that this will delete all of my databases - could you tell me where they are stored on the Mac so I can grab it from Time Machine when re-installed?

Thanks
Herr_Someone
 
Posts: 62
Joined: Sun Aug 14, 2011 12:40 pm

Re: Unable To Login To Database (postgres)

Postby kraada » Thu Apr 24, 2014 4:28 pm

Just don't follow the steps regarding deleting /Library/PostgreSQL -- that's where the databases are stored. Skip that step, leave the directory in place, and just reinstall the new version in the same place and it'll pick up your databases.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable To Login To Database (postgres)

Postby Herr_Someone » Thu Apr 24, 2014 4:52 pm

I've installed the latest version but am still getting errors.

Screen Shot 2014-04-24 at 21.50.54.png
(40.68 KiB) Downloaded 1882 times


I made sure that the port was the same, and the password was dbpass, but it hasn't helped.
Herr_Someone
 
Posts: 62
Joined: Sun Aug 14, 2011 12:40 pm

Re: Unable To Login To Database (postgres)

Postby kraada » Thu Apr 24, 2014 6:08 pm

Open Utilities -> Terminal and type this:
ps ax | grep -i postgres

and paste the output here.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable To Login To Database (postgres)

Postby Herr_Someone » Fri Apr 25, 2014 2:41 am

Here you go :

205 ?? Ss 0:00.02 /Library/PostgreSQL/9.3/bin/postmaster -D/Library/PostgreSQL/9.3/data
207 ?? Ss 0:00.00 postgres: logger process
209 ?? Ss 0:00.00 postgres: checkpointer process
210 ?? Ss 0:00.04 postgres: writer process
211 ?? Ss 0:00.01 postgres: wal writer process
212 ?? Ss 0:00.00 postgres: autovacuum launcher process
213 ?? Ss 0:00.01 postgres: stats collector process
503 s000 S+ 0:00.00 grep -i postgres
Herr_Someone
 
Posts: 62
Joined: Sun Aug 14, 2011 12:40 pm

Re: Unable To Login To Database (postgres)

Postby kraada » Fri Apr 25, 2014 7:35 am

Ok, PostgreSQL is running then. What'll probably be easiest is editing the pg_hba.conf file to remove the need for a password -- then you can't have the password fail.

To do this, follow the directions here. Don't forget to reset the permissions properly at the end or the server won't start. You shouldn't need to add any extra lines though just change where it says "md5" to "trust".
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Unable To Login To Database (postgres)

Postby Herr_Someone » Fri Apr 25, 2014 2:01 pm

I did as suggested and gave my Mac a restart, but now the error has reverted back to :

Screen Shot 2014-04-25 at 19.00.32.png
(32.37 KiB) Downloaded 1811 times
Herr_Someone
 
Posts: 62
Joined: Sun Aug 14, 2011 12:40 pm

Re: Unable To Login To Database (postgres)

Postby kraada » Fri Apr 25, 2014 3:29 pm

Look in Application -> Utilities -> Console. Are there any errors relating to PostgreSQL there?

Also: You did set the permissions back before restarting your computer, right?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to PT4 for macOS

Who is online

Users browsing this forum: No registered users and 0 guests