How to resolve this issue.

"database error unable to connect to the database could not connect to mysql"

Ensure that you check the php version in Cpanel.

 

Joomla 1.5 is not compatible with php versions higher than 5.4.

Changing to version 5.4 will do the trick.