We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Postgresql 9 - psql: could not connect to server: No such file or directory

R7AF
R7AF asked
on
Medium Priority
1,746 Views
Last Modified: 2012-05-11
I have just installed PostgreSQL 9.0.4 on my local machine (ubuntu 10.10), after removing 8.4. Now I want to import a database that is so large that the import in Pgadmin crashes. So I need psql to do this, but when I try, I get the following error:

psql: 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"?

The server seems to be running though, as I can open Pgadmin, create a database, etc. So I wonder if this is different from 8.4? How can I get this working?
Comment
Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Top Expert 2007

Author

Commented:
Thanks!

psql -hlocalhost -Upostgres
psql -hlocalhost -Upostgres  database_name

(At first I read it like "database" was a parameter name, with the space inbetween database and name.)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.