Applicable to:
- Plesk for Linux
Symptoms
-
It is not possible to access Horde webmail or some menus in Horde webmail :
PLESK_INFO: A fatal error has occurred
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'horde.horde_prefs' doesn't exist
Details have been logged for the administrator.
CONFIG_TEXT: Server error when querying database.
CONFIG_TEXT: A fatal error has occurred Could not instantiate PDO. PDOException: SQLSTATE[HY000] [1049] Unknown database 'horde' Details have been logged for the administrator..
-
It is not possible to remove/rename an email account in Plesk:
PLESK_ERROR: DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'horde.imp_sentmail' doesn't exist, query was: DELETE FROM horde.imp_sentmail WHERE (sentmail_who = 'john_doe@example.com')
PLESK_ERROR: DB query failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'horde.ingo_sharesng' doesn't exist, query was: DELETE FROM horde.imp_sentmail WHERE (sentmail_who = 'john_doe@example.com')
-
It is not possible to rename a domain in Plesk:
PLESK_ERROR: Error: External exception. SQLSTATE[42S02]: Base table or view not found: 1146
Table 'horde.kronolith_events' doesn't exist,
query was: UPDATE `horde`.`kronolith_events` SET `calendar_id` = CONCAT(SUBSTRING(`calendar_id`, 1, LOCATE("@", `calendar_id`)), 'example.net') WHERE (SUBSTRING(`calendar_id`, LOCATE("@", `calendar_id`)) = '@example.com') -
Re-installation of Horde webmail fails with:
CONFIG_TEXT: Re-installation of Horde or Roundcube using Plesk installer returns the following error:
====================
Fatal Error:
SQLSTATE[HY000]: General error: 1005 Can't create table 'horde.imp_schema_info' (errno: 121)
In /usr/share/psa-pear/pear/php/Horde/Db/Adapter/Pdo/Base.php on line 231
Cause
The database of Horde webmail is missing or corrupted.
Resolution
-
Connect to the Plesk server via SSH.
-
For security reasons, create a copy of the
/var/lib/mysql/horde
directory:# cp -r /var/lib/mysql/horde /root/
-
Empty the
/var/lib/mysql/horde
directory:# rm -rf /var/lib/mysql/horde
-
Drop the 'horde' database:
# plesk db "drop database horde"
-
Switch to the directory with daily dumps:
# cd /var/lib/psa/dumps
-
Find the most recent dump that contains the 'horde' database:
# zgrep "Current Database:" mysql.daily* | grep horde
mysql.daily.dump.0.gz:-- Current Database: `horde`
mysql.daily.dump.1.gz:-- Current Database: `horde`
mysql.daily.dump.2.gz:-- Current Database: `horde`-
where
mysql.daily.dump.0.gz
is the most recent daily dump.
-
-
Restore the 'horde' database from the most recent daily dump. In this example, the 'horde' database is restored from
mysql.daily.dump.0.gz
:# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `horde`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
-
Try to access Horde.
-
Connect to the server via RDP.
-
Switch to the directory with daily dumps:
C:\> cd %plesk_dir%Mysql\Backup
-
List all available Plesk daily dumps sorted by date (newest first):
C:\> dir /O:-D
\
Directory of C:\Program Files (x86)\Plesk\MySQL\Backup
\
10/18/2018 02:07 AM 106,128 horde-20181018020721.sql
10/18/2018 02:07 AM 122,124 config-20181018020721.reg
10/18/2018 02:07 AM 28,707 apsc-20181018020721.sql
10/18/2018 02:07 AM 389,032 psa-20181018020721.sql -
Restore the Horde database:
C:\> "%plesk_dir%\Mysql\bin\mysql.exe" -uadmin -P3306 -p horde < horde-20181018020721.sql
Note: MySQL admin password is required for this operation.
If the password is not known, go to Tools & Settings > Database Servers > localhost > PhpMyAdmin > horde > Import and import the required backup file.
Comments
2 comments
Do we have solution for windows for the similar issue?
Hello @Sreehari,
Plese restore the system database for Horder using the instruction from the article (section "Restoring system databases from a Plesk daily dump"):
https://support.plesk.com/hc/en-us/articles/213904125
If the assistance is required, please contact technical support:
https://support.plesk.com/hc/en-us/requests/new
Please sign in to leave a comment.