Postgresql server not started in ubuntu 14.04

39,166

Solution 1

Just try to restart

sudo /etc/init.d/postgresql restart

this worked for me :)

Solution 2

Ubuntu16.04 and 9.3

sudo systemctl restart postgresql-9.3.service

Maybe you find out service before restarting server

service --status-all
Share:
39,166

Related videos on Youtube

Dinesh
Author by

Dinesh

Updated on September 18, 2022

Comments

  • Dinesh
    Dinesh almost 2 years

    My problem is after postgresql installed try to configure postgresql database it's show error message like below:

    dineshlap@ss-laptop:~$ sudo -u postgres psql postgres
    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"?
    

    and i tried lot of solutions from internet. but, nothing worked for me! :(

    if you know the solution for this problem please, answer this post!

    Note : I'm using ubuntu 14.04 (64 bit) and postgresql 9.3

    • Dinesh
      Dinesh about 9 years
      @xunilk thanks for your response! i tried but, same problem occurs!
    • xunilk
      xunilk about 9 years
      Uninstall postgresql with purge and clean and try to install it again. I had a similar problem in Debian and I solved it in this way.
    • Mario Tacke
      Mario Tacke almost 8 years
      I solved my issue after correcting the pg_hba.conf file. I had removed the CIDR block info from the bindings section.
  • Pranav Singh
    Pranav Singh over 7 years
    its asking for password. what's the default password here?
  • Talal
    Talal over 7 years
    @PranavSingh that's your sudo password nothing to do with psql
  • Zanna
    Zanna over 7 years
    This question is about 14.04, so you can't call systemctl. The other answer recommends restart. Seems very odd to include a version number in the command also - is this really needed?
  • Giang Bui Truong
    Giang Bui Truong over 7 years
    My ubuntu is 16.04 on ubuntu 14.* try like "sudo service xyz start"