Guest User

Untitled

a guest
Mar 21st, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. psql: could not connect to server: No such file or directory
  2. Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
  3.  
  4. postgresql.service - PostgreSQL RDBMS
  5. Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
  6. Active: active (exited) since tue 2016-05-24 09:24:13 CEST; 3s ago
  7. Process: 5658 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
  8. Main PID: 5658 (code=exited, status=0/SUCCESS)
  9.  
  10. sudo service postgresql start (or restart or stop)
  11.  
  12. DETAIL: Permissions should be u=rwx (0700).
  13. FATAL: data directory "/var/lib/postgresql/9.4/main" has group or world access
  14.  
  15. sudo chown -R postgres:postgres /var/lib/postgresql/9.4/
  16. sudo chmod -R u=rwX,go= /var/lib/postgresql/9.4/
  17.  
  18. psql -U username -h localhost
  19.  
  20. root@cloud:~# psql -u postgres -h localhost
  21.  
  22.  
  23. /usr/lib/postgresql/9.6/bin/psql: invalid option -- 'u'
  24. Try "psql --help" for more information.
  25. root@kencloud:~# psql -U postgres -h localhost
  26. psql: could not connect to server: Connection refused
  27. Is the server running on host "localhost" (127.0.0.1) and accepting
  28. TCP/IP connections on port 5432?
Add Comment
Please, Sign In to add comment