Centos 7.4, postgresql, owncloud 9 install, can't connect to database to run setup



I'm doing a new install of owncloud 9.1.5 on Centos 7.4. Owncloud RPMs are from centos distro. php5, postgresql 9.2

I've followed the database initialization instructions, created a user owncloud, set password, and created owncloud database. I've edited the pg_hba.conf file to set md5 for passwords for localhost connection. I've verified that I can connect using owncloud user via command-line pgsql utility.

When I try to run the initial setup, I continue to get "username and/or password not valid" and initial setup fails. My owncloud.conf file looks correct. postgresql log says authentication failed for my owncloud user. However, I can connect from command-line so I believe that end is working.

In the system logs, is see owncloud php errors "Failed to connect to the database.

password authentication failed for user \"owncloud\"","Code":0,"Trace":"#0

Any idea how to fix this?





Weirdest thing. Owncloud started connecting to the database using the username/password I configured. I restarted postgres several times, but it seemed to start working after I edited postgresql.conf to turn on/off advanced debugging. My pg_hba.conf is set up for local/peer and host loopback set to md5.