Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

“Database error connection failed”--- Roundcube

This error can be caused mainly because of the below reasons :

1. Database server is not running properly


2. A corrupted Roundcube database
3. database with some missing data or tables with bugs can also cause this
issue.
4. In the Cpanel server, the details of all Cpanel domain’s emails are
stored in a single Roundcube database and this also can make the
database very huge. This also can cause a database connection failed
error in Roundcube.

Solution :

1. Check MySQL connection :

Check the MySQL database server status using the given command ;

service mysqld status

• Restart MySQL service if not running.

2. Repair/Restore the Database:

• Check Roundcube database accessibility:

mysql -u roundcube -p

mysql> show databases;

• Check tables in the Roundcube database:

mysql > show tables;

if you get ERROR 1046 (3D000): No database selected


then use below command

USE roundcube;

And you will see like below

+---------------------+

| Tables_in_roundcube |

+---------------------+

| cache |

| cache_index |

| cache_messages |

| cache_shared |

| cache_thread |

| collected_addresses |

| contactgroupmembers |

| contactgroups |

| contacts |

| dictionary |

| filestore |

| identities |

| searches |

| session |

| system |

| users |

+---------------------+

• Repair Roundcube database:

mysqlcheck -r roundcube

• Rebuild Roundcube from the command line:


/usr/local/cpanel/bin/update-roundcube --force

• Restore Roundcube from the latest backup:

mysql roundcube < roundcube.sql

• Remove existing Roundcube database after restoration:

mysql > drop database roundcube_old;

3. Convert to SQLite Database Type:

• switch to SQLite:

/scripts/convert_roundcube_mysql2sqlite

Notes:

• Ensure you have a backup before making changes.

You might also like