Can't access the postgre database for a DHIS2 instance installed with dhis2 server tool

I just installed a DHIS2 instance using the dhis2-server-tools package. I now want to execute a sql script on the database to populate it with metadata and data. I tried to enter the postgre database in the lxd container but i can’t. I tried different username but none seems to work.

psql -U postgre
psql -U admin
psql -U dhis2

What is the username and password of the postgre user? How can i excute my sql script on the postgre database for my DHIS2 v2.39?

Hello @lens,

You can run simple command to execute the sql query outside the lxd container.

Sample : lxc exec postgres – psql -d db_name -c "SELECT * FROM public.trackedentity.attribute.value

Thanks