Roundcube cannot connect to database. Help please?

kamnet

Member
May 7, 2003
20
0
151
Client reported this evening that they get the following error trying to log into roundcube:

DATABASE ERROR: CONNECTION FAILED!

I honestly have NO CLUE where to start debugging this, I'm not finding any errors, I'm stressed I'm tired I could use an extra hand trying to resolve this from the beginning. Anybody care to guide me? Hold my hand? Tell me it's going to be alright? :)
 

logicsupport

Well-Known Member
Jun 5, 2007
138
0
166
How to fix roundcube database error

Please try the following procedure.
=====

create database roundcube;
exit;

Then do the procedure:

mysql-u root-D roundcube-p </usr/local/cpanel/base/3rdparty/roundcube/SQL/mysql.initial.sql

After that, look for the file:

vi /usr/local/cpanel/base/3rdparty/roundcube/config/db.inc.php
In line similar to the database -> mysql://roundcube:SENHADOROUNDCUBE@localhost/roundcube

replace by:

mysql://root:SENHADEROOT@localhost/roundcube


Now try your webmail using roundcube


Also ,

* Check if db.inc.php and main.inc.php contains the correct entries such as username , password and database name
* Running the command /usr/local/cpanel/bin/update-roundcube --force will also help
* go to phpmyadmin and repair all round cube tables
* Also check and reset the mysql root password in whm just to make sure it is set .
*Last but not the least try /scripts/upcp --force


Make a copy of roundcube database under /var/lib/mysql before trying any of the above methods
 

kamnet

Member
May 7, 2003
20
0
151
OK, I did all of the above. User can log into RoundCube again, but two complaints:

1) Inbox is almost a week and a half behind
2) Cannot send new messages, it hangs with a message of "Sending message"
 

PlatinumServerM

Well-Known Member
PartnerNOC
Jul 10, 2005
400
3
168
New Jersey, USA
cPanel Access Level
Root Administrator

logicsupport

Well-Known Member
Jun 5, 2007
138
0
166
Hello kamnet ,

Check if you can get any errors from the logs .

Common fixes recommended are :-

1 ) vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php

and change

$rcmail_config['smtp_user'] = '%u';
to
$rcmail_config['smtp_user'] = '';

2) If you are using csf , check csf configuration file for the entry

SMTP_BLOCK = "1"
SMTP_ALLOWLOCAL = "1"

If the value is 0 change it to 1 and restart csf

3) update cPanel ( /scripts/upcp --force ) to latest "STABLE" version.

4) increase the memory_limit in php.ini under /usr/local/cpanel/base/3rdpart/roundcube/

Try any of the above methods :)
 

kamnet

Member
May 7, 2003
20
0
151
I forced an update of cpanel from the command line (suggested a few posts ago) and that helped to fix part of the problems but not all of them. After I logged back into WHM I was greeted with a new license screen for RoundCube, after I cleared that I tried doing a cPanel update from within WHM, and that appears to have cleared everything up.