How to Fix “/var/lib/pgsql/data is missing. Use “service postgresql initdb” to initialize the cluster first” Error On Linux CentOS 6.2 Server

Question :
When i typing service postgresql start as root on linux CentOS 6.2 server, i got the following error message :

[root@centos62 ~]# service postgresql start

/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
                                                           [FAILED]

Answer :

PostgreSQL is a Sophisticated open-source Object-Relational DBMS supporting almost all SQL constructs, including subselects, transactions, and user-defined types. PostgreSQL is a powerful, open source object-relational database system that available for many platforms including Linux, FreeBSD, Solaris, Microsoft Windows and Mac OS X. On Linux CentOS 6.2, you have to type “service postgresql initdb” first before starting postgresql server. Please type the following command :

[root@centos62 ~]# service postgresql initdb
Initializing database:                                     [  OK  ]

2 comments on “How to Fix “/var/lib/pgsql/data is missing. Use “service postgresql initdb” to initialize the cluster first” Error On Linux CentOS 6.2 Server

  • Ajay

    Thank you. Its worked.

  • Gerard

    Thanks Skytech. It works fine!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>