The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Roundcube cannot connect to database. Help please?

Discussion in 'General Discussion' started by kamnet, Jul 1, 2009.

  1. kamnet

    kamnet Member

    Joined:
    May 7, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    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? :)
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  4. kamnet

    kamnet Member

    Joined:
    May 7, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    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"
     
  5. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  6. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    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 :)
     
  7. kamnet

    kamnet Member

    Joined:
    May 7, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  8. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18

    Umm... shouldn't that be the *first* item of text rather than the last ;)
     
Loading...

Share This Page