Knowledgebase Home / How to Fix “Database Error Connection Failed” in RoundCube Webmail
// View Comments //

How to Fix “Database Error Connection Failed” in RoundCube Webmail

RoundCube is a popular free IMAP client known for its easy setup and desktop-like interface, storing its data in a database. If you’re facing the “Database error connection failed” issue on a cPanel server, it usually points to a database connection problem. In this guide, we’ll show you simple steps to fix this common RoundCube error and get your email service back online quickly

Quick Steps

  1.  Go to the folder: `/home/<cpanel_user>/etc/<domain>/` in cPanel.
  2.  Rename the file `<email_user>.rcube.db` to `<email_user>.rcube.db.bak` or move it out of the folder.
  3.  Find the most recent backup file, `<email_user>.rcube.db.<number_stamp>`, and rename it to `<email_user>.rcube.db`.
  4. Try to access RoundCube again.

    If you want to reset RoundCube without restoring previous settings:

  5.  Simply rename `<email_user>.rcube.db` to `<email_user>.rcube.db.bak` or move it out of the folder.
  6.  Then, attempt to access RoundCube again to start fresh.

How to Fix “Database Error Connection Failed” in RoundCube Webmail

Log in to your cPanel account and access the Database Folder in cPanel. For that, navigate to the File Manager and open the following directory path:

/home/<cpanel_user>/etc/<domain>/

cPanel File Manager Interface

cPanel File Manager Interface

Replace <cpanel_user> with your actual cPanel username and <domain> with your domain name.

In the folder, locate the file named <email_user>.rcube.db. This file is the current mailbox database for RoundCube.

cPanel File Manager Interface

cPanel File Manager Interface

Rename this file to <email_user>.rcube.db.bak and keep it as a backup. You can also move it out of the folder for safekeeping

Within the same folder, look for backup files that have a timestamp, such as <email_user>.rcube.db.<number_stamp>. These files are previous versions of the database.

Select the most recent file based on the timestamp (the larger the number, the more recent it is).

Rename this backup file to <email_user>.rcube.db so that it will be recognized as the active database file.

cPanel File Manager Interface

cPanel File Manager Interface

Now, try logging into RoundCube webmail again. It should load using the restored database version.

Reset RoundCube Without Previous Settings

If you wish to start fresh without restoring any previous database settings, simply follow the steps below.

  • Rename or move the current <email_user>.rcube.db file to <email_user>.rcube.db.bak or another folder.
  • Open RoundCube again. It will create a new database file, and you can configure it from scratch.

Conclusion

RoundCube relies on either a MySQL or SQLite database to store important information like contacts and other details. When it cannot connect to the database, a “database error connection failed” message will appear. By following the steps outlined in this article, you can quickly and easily resolve this issue, ensuring that RoundCube can reconnect to the database and function properly on your cPanel server.


If you have any web hosting questions please feel free to reach out to us. We're happy to help.
Shared Hosting | Reseller Hosting | Managed WordPress Hosting | Fully Managed VPS Hosting

Our Guiding Principles

  • Provide consistent, stable, and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high-quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.
Subscribe to comment notifications
Notify of
guest
0 Comments
Inline Feedbacks
View all comments