How to fix Webmin PostgreSQL 12 error: The PostgreSQL host configuration file pg_hba.conf was not found on your system

The following article shows how to fix the Webmin PostgreSQL 12 error that says: The PostgreSQL host configuration file /var/lib/pgsql/data/pg_hba.conf was not found on your system, indicating that the database has not been initialized yet. Click the button below to set up PostgreSQL.

Clicking on the error’s Initialize Database button as recommended by the error message won’t help. The issue with the wrong path to  PostgreSQL 12 needs to be rectified in the configuration.

Open Webmin and navigate to the following config icon:

Then change the path to PostgreSQL default /var/lib/pgsql/data/pg_hba.conf, to /var/lib/pgsql/12/data/pg_hba.conf

Additionally, you can also change the START with ‘sudo systemctl start postgresql-12‘ and STOP with ‘sudo systemctl stop postgresql-12

 

Once done, press the Save button and Voila!, the issue is fixed:

Facebook Comments