Plesk

Unable to access Horde webmail or rename a domain in Plesk: Table ‘horde.table_name’ doesn’t exist

Symptoms

Cause

The database of Horde webmail is missing or corrupted.

Resolution

Note: If Horde webmail is not required on the server and another webmail is being used server-wide (Roundcube/MailEnable), remove the Horde component from the server.

 

For Plesk on Linux

 

  1. Connect to the Plesk server via SSH.

  2. For security reasons, create a copy of the /var/lib/mysql/horde directory:

    # cp -r /var/lib/mysql/horde /root/

  3. Empty the /var/lib/mysql/horde directory:

    # rm -rf /var/lib/mysql/horde

  4. Drop the 'horde' database:

    # plesk db "drop database horde"

    • If you get the message below, ignore it and move to step 4:

      CONFIG_TEXT: ERROR 1008 (HY000) at line 1: Can't drop database 'horde'; database doesn't exist

  5. Switch to the directory with daily dumps:

    # cd /var/lib/psa/dumps

  6. 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.

  7. 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

 

For Plesk on Windows Server

 

  1. Connect to the Plesk server via RDP.

  2. Start a command prompt as an Administrator.

  3. Switch to the directory with daily dumps:

    C:> cd %plesk_dir%MysqlBackup

  4. List all available Plesk daily dumps sorted by date (newest first):

    C:> dir /O:-D

    Directory of C:Program Files (x86)PleskMySQLBackup

    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

  5. Restore the Horde database:

    C:> "%plesk_dir%Mysqlbinmysql.exe" -uadmin -P3306 -p horde < horde-20181018020721.sql

    Note: MySQL admin user password is required for this operation. If the password is unknown, go to Tools & Settings > Database Servers > click next to MySQL/MariaDB to enter phpMyAdmin. In phpMyAdmin, click horde > Import > Browse to select the horde-....sql file from step 4 > then click Go to import the database.