We might have come across this issue some times after cPanel upgrade. When attempting to log into RoundCube the following error appears:
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.
To fix this problem, SSH into the server as root.
This will update the Roundcube with the current cPanel compatible Roundcube RPM there by fixes the problem.
Have a nice Day!!!