How to resolve the Connecting to database..FAILED error ;(

I’m creating this thread as a continuation for this one: http://www.freepbx.org/forum/connecting-to-database-failed, as mentioned by fskrotzki.

Let me repeat the issue which I’m facing:

I’ve installed the Asterisk 1.4.17 on my Red Hat Enterprise Linux Client release 5 (Tikanga). The kernel version is 2.6.18-8.1.4.el5.

Now I need to install FreePBX on my machine when I try to do that I got the error: Connecting to database…FAILED.

These are the links which I’d followed for installing
http://aussievoip.com.au/wiki/freePBX-Centos
http://voip-info.org/wiki/index.php?page=Asterisk+Starting+and+Stopping
http://www.asteriskguru.com/tutorials/asterisk_installation_compilation_fedora.html

The previous thread (http://www.freepbx.org/forum/connecting-to-database-failed), for the same error is not giving me any clue.

I’ve seen this line from: http://aussievoip.com/wiki/index.php?page=freePBX-Ubuntu

“it means that you haven’t done the ‘GRANT ALL PRIVILEGES …’ command in MySQL, or, you’ve put the wrong password in when you were doing the installation. All is not lost. If you want to re-run the installation, with it prompting you again, you can simply delete the /etc/amportal.conf file (rm /etc/amportal.conf) or edit it and put the correct password in. Then re-run ./install_amp and it should proceed along happily.”

So made sure that the GRANT ALL PRIVILEGES has been executed properly.

Still I’m encountering the same Connecting to database…FAILED error. Can anybody help me what I’m doing wrong?

have you gone through this set of install docs (http://www.freepbx.org/support/documentation/installation/install-process-for-centos-5-1)?

It is located under documentation, installation. I know that it does work and CentOS is RHEL 5 without the Red Hat branding.