Link to home
Start Free TrialLog in
Avatar of R7AF
R7AFFlag for Netherlands

asked on

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

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?
ASKER CERTIFIED SOLUTION
Avatar of jackiechen858
jackiechen858
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of R7AF

ASKER

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.)