RoundCube Unable to connect to the database

roundcubeubuntu-10.04

I just installed the RoundCube php mail client. I check the MySQL database and the new table was created, but through browser I'm getting the following error:

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

I check the debian-db.php and the login parameters are correct, I also tried through terminal and I can connect to the db using this parameter

$dbuser='roundcube';
$dbpass='mypass';
$basepath='';
$dbname='roundcube';
$dbserver='';
$dbport='';
$dbtype='mysql';

Best Answer

I check the error log and there is the following error:DB Error: unable to find package 'MDB2_Driver_mysql' file 'MDB2/Driver/mysql.php', How can I fix this?

apt-get install php-pear
pear install MDB2_Driver_mysql