Possible fix for Postgres in Lion

45 views
Skip to first unread message

Adrianna Tan

unread,
Aug 22, 2011, 3:48:27 AM8/22/11
to lad...@googlegroups.com
For everyone who was having trouble with Postgres because of Lion, try the following fix: https://trac.macports.org/ticket/30125

I was using the Homebrew method instead of Macports, which does the Postgres install using my Mac username and password. So what I did was to force postgres to use a hostname like this:

 psql -h localhost postgres skinnylatte

If you used Macports you just replace the 'skinnylatte' with 'postgres' or whatever username you ended up using.

That fixed it for me.

Check the original thread for other alternatives: https://trac.macports.org/ticket/30125

Also, if you need help simply connect to the #python-sg IRC channel. If you want to access the IRC channel via a web browser, go here: http://webchat.freenode.net/?channels=python-sg (otherwise, Mac users download Colloquy).

Adrian Quek

unread,
Aug 25, 2011, 3:28:06 AM8/25/11
to LadyPy, Singapore
Hi guys, so is session #3 still on Saturday or has it been postponed/
canceled or shifted to today?

Victor Neo

unread,
Aug 25, 2011, 3:46:54 AM8/25/11
to lad...@googlegroups.com

It's still on for Saturday! Today is a meetup / hack-along.

Adrianna Tan

unread,
Aug 25, 2011, 7:02:50 AM8/25/11
to lad...@googlegroups.com
Yeah, not postponing. Vote early! :D

michelle

unread,
Aug 25, 2011, 1:02:40 PM8/25/11
to lad...@googlegroups.com
Hii....

I followed the steps .. but i still got the error. :(


Victor Neo

unread,
Aug 25, 2011, 7:36:15 PM8/25/11
to lad...@googlegroups.com

That error came up because your postgresql server was not started. 

You will need to start the server first with 'postgres -D [location to your postgres database]'  before you run the command above. The [location to your postgres database] is where you have done a 'initdb' before.




Calvin Cheng

unread,
Aug 25, 2011, 11:50:53 PM8/25/11
to lad...@googlegroups.com
Hi Michelle,

Try issuing these commands in your terminal and tell me if the last command finally gets you connected to your postgresql database:-
DIR=/opt/local/var/db/postgresql90/defaultdb
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.postgresql90-server.plist
sudo mkdir -p $DIR
sudo chown postgres:postgres $DIR
sudo su postgres -c "/opt/local/lib/postgresql90/bin/initdb -D $DIR"
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql90-server.plist
psql -h localhost -U postgres



michelle

unread,
Aug 26, 2011, 12:49:42 AM8/26/11
to lad...@googlegroups.com
Hi,,,

Here is the output... :)


Thx. =]

Victor Neo

unread,
Aug 26, 2011, 7:37:45 AM8/26/11
to lad...@googlegroups.com

Michelle, your postgresql is running fine. 

If you see the the psql running without complaining errors it means that it has successfully connected to your DB.

Suling

unread,
Aug 26, 2011, 10:55:28 PM8/26/11
to lad...@googlegroups.com
hi everybody, 

I know this is kinda late but will anyone be at the workshop early today? 
I'm flitting between win(temp replacement which I had been using for the previous sessions) and mac (completely new, snow leopard), and ran into some trouble with both last night.
I'm using mysql for win and i'm not too sure if I got pass the installation part properly. 
The mac thingy... well. Installed a jumble of stuff but it feels messed up. @_@
I'm keeping my fingers crossed!

su


Victor Neo

unread,
Aug 26, 2011, 11:04:20 PM8/26/11
to lad...@googlegroups.com
You are in luck because I'm at school already, though I'm at Macdonald's instead because Pitchstop Cafe isn't open (as well as the canteen near it).

When will you be reaching? I'll try and make it back there in time.
--
Regards,
Victor Neo
Reply all
Reply to author
Forward
0 new messages