Symptoms
-
Roundcube webmail fails to open with this error:
Database error: connection failed!
Unable to connect to database!
Please contact your server-administrator. -
Steps from the article did not help
Cause
The roundcubemail
database is corrupted
Resolution
-
Connect to the server via SSH
-
Switch to the directory with daily dumps:
# cd /var/lib/psa/dumps
-
List all available Plesk daily dumps:
# ls -l mysql.daily*
-rw——- 1 root root 236253 Feb 3 01:51 mysql.daily.dump.0.gz
-rw——- 1 root root 229653 Feb 2 01:48 mysql.daily.dump.1.gz
-rw——- 1 root root 222485 Feb 1 01:56 mysql.daily.dump.2.gzNote: The file
mysql.daily.dump.0.gz
is the most recent dump. -
Restore the
roundcubemail
database from the most recent daily dump:# zcat mysql.daily.dump.0.gz | sed -n ‘/– Current Database: `roundcubemail`/,/– Current Database:*/p’ | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin –default-character-set=utf8
If the steps above did not help, then
-
Drop the database
MYSQL_LIN: mysql> drop database roundcubemail;
-
Reinstall the RoundCube webmail following steps from the article: How to install / uninstall Plesk components