All threads / could not connect to database postgres
Ask A Question


You’re not receiving notifications from this thread.

could not connect to database postgres

Peter Boomsma asked in Databases

I'm trying to install postgresql but I'm running into an error when I try to create a user:

createuser: could not connect to database postgres: could not connect to server: No such file or directory
  Is the server running locally and accepting
  connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

It sounds like postgres isn't running. There is a ton of information on managing it from here

Peter, is this in development or in production? If it's Linux and your on production you can do a service postgresql status to see if it it's running or a ps aux | grep -i post to see if there are any Postgres processes running.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.