I've got a clean instance of CentOS and a clean instance of RHEL 6.3 - I've tried to installed Moodle on both.
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
The database does work - I've tried it from a shell on the box. I've tried with a remote database, and with a local database.
I've tried to remove the config.php and clear the database, and allow moodle to create run it's fresh install script, and again, I have the same problem.
The stange thing is, that I have RHEL 5.x and 6.x boxes that are running moodle instances, but I never had a problem installing them, so I never really looked closly at the stack. What is worrying me, is that these failures are occurring on my new system images - Systems that have been updated to the latest available packages in the repo in the last few weeks.
Has anyone else come across a similar problem?
I indeed have exactly the same problem; note that this is the first time I install moodle with postgres. The question is clearly one in the interoperability of php and pgsql, as is evident from the http error log: ( I have replaced "localhost" with "127.0.0.1")
Looking at the pg logs,I notice that no connection gets through. I have turned off the firewall, so that is not that either.
I finnaly thought of selinux--that is usually the problem. A little bit of googling shows that
solves this problem.