Applicable to:
- Plesk for Linux
Symptoms
-
Roundcube webmail fails to open with this error:
CONFIG_TEXT: Database error: connection failed!
Unable to connect to database!
Please contact your server-administrator. - Removing mailbox in Plesk fails with the following error:
PLESK_ERROR: DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146
Table 'roundcubemail.users' doesn't exist, query was: DELETE FROM
`roundcubemail`.`users` WHERE (username = 'jdoe@example.com) -
Steps from the article did not help
-
The following error can be found in the file
/var/log/plesk-roundcube/errors
:CONFIG_TEXT: DB Error: [1146] Table ‘roundcubemail.session’ doesn’t exist (SQL Query: INSERT INTO `session` (`sess_id`, `vars`, `ip`, `changed`) VALUES (‘dqb2nh226vofd695abnofe4ocb’, ‘mxvZ2luIjtza2luX2...NvbmZpZ3xhOjU6e3’, ‘213.0.1.2’, now())) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 543 (GET /roundcube/index.php?_user=jdoeA%example.com)
-
The following MySQL request shows empty output:
MYSQL_LIN: mysql> use roundcubemail;
mysql> show tables;
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
Warning: In case the above solution did not help:
-
Drop the database
# plesk db "drop database roundcubemail;"
-
Reinstall the RoundCube webmail following steps from the article: How to install / uninstall Plesk components
Comments
0 comments
Please sign in to leave a comment.