[MacPorts] #30125: psql: could not connect to server: Permission denied
MacPorts
noreply at macports.org
Fri Jul 22 03:18:02 PDT 2011
#30125: psql: could not connect to server: Permission denied
--------------------------------+-------------------------------------------
Reporter: conradwt@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.9.2
Keywords: lion x86_64 | Port: postgresql90-server
--------------------------------+-------------------------------------------
Comment(by interface@…):
I experienced the same problem and worked around it by issuing the
following commands:
{{{
DIR=/opt/local/var/db/postgresql91/defaultdb
sudo launchctl unload -w
/Library/LaunchDaemons/org.macports.postgresql91-server.plist
sudo mkdir -p $DIR
sudo chown postgres:postgres $DIR
sudo su postgres -c "/opt/local/lib/postgresql91/bin/initdb -D $DIR"
sudo launchctl load -w
/Library/LaunchDaemons/org.macports.postgresql91-server.plist
psql -h localhost -U postgres
}}}
Do the following if you should get the notorious {{{FATAL: could not
create shared memory segment: Cannot allocate memory}}} error after the
initdb command:
{{{
sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216
}}}
Hope that helps.
--
Ticket URL: <https://trac.macports.org/ticket/30125#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list