Cannot find pg_hba.conf and postgreql.conf file on OS X?
If you can connect to Pg as the superuser (usually postgres
) simply SHOW hba_file;
to see its location.
Otherwise you have to find out how PostgreSQL is started to locate its data directory.
By default homebrew, on intel Macs, puts everything in /usr/local
So the postgresql conf files will be /usr/local/var/postgres/
If you are on an M1 Mac, brew will use a path like /opt/homebrew/var/postgres/pg_hba.conf
Worst case, you can search for it:
find / -type f -name pg_hba.conf 2> /dev/null