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

Share this Article :

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

[[email protected] ~]# 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 :

[[email protected] ~]# service postgresql initdb
Initializing database:                                     [  OK  ]

One Response

  1. Ajay

Leave a Reply