Search code examples
postgresqlsudopsqlcloud9-ide

Postgres database setup on Cloud9 asks for sudo password


So I'm using the Cloud9 ide to collaborate on a Node.js project. We are using Postgresql for the database, and the documentation for Postgres seems to make it quite simple. I can sudo service postgresql start without a problem but I can't sudo -u postgres psql without it asking for my password, which I don't know because Cloud9 set up the environment for me. Any fixes or suggestions?


Solution

  • Instead of running sudo -u postgres psql try running sudo sudo -u postgres psql and you'll get right in. The documentation previously noted this but was recently changed. It will soon be reverted.