Unable to delete mail account: Unknown database horde

Created:

2016-12-12 03:41:35 UTC

Modified:

2017-08-08 13:41:17 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to delete mail account: Unknown database horde

Applicable to:

  • Plesk 12.5 for Windows

Symptom

Unable to delete user@example.com mail account. The following error appears in Plesk:

SQLSTATE[HY000] [1049] Unknown database 'horde'

Cause

MySQL 5.6 database server has been removed manually from Plesk and MySQL 5.7 has been configured to use port 3307 and set up as default. However, databases for Horde, WebPresenceBuilder, SpamAssassin applications have been left in MySQL 5.6

Resolution

Add MySQL 5.6 server back and set it as default. This is recommended way.

OR

Dump horde , sitebuilder5 and sa_bayes databases on MySQL 5.6 and restore it on MySQL 5.7 as follows:

NOTE! That these custom modifications can cause an issue during Plesk upgrade/migration.

  • Open the file %plesk_dir%MySQL\\Data\\my.ini

  • Under the section [PleskSQLServer] add the entry skip-grant-tables

Horde database :

  1. Create a backup of horde database:

    "%plesk_dir%MySQL\\bin\\mysqldump.exe" -uadmin -P3306 horde > C:\\db_backup\\horde.sql
  2. Enter MySQL 5.7 on port 3307:

    "%plesk_dir%"MySQL\\bin\\mysql" -u<user_name> -p<password> -P3307
  3. Create the user horde :

    CREATE USER 'horde'@'localhost' IDENTIFIED BY '*****'
    • The password for the user can be obtained from "%plesk_dir%Webmail\\horde\\horde\\config\\conf\\.horde.shadow
  4. Create the database horde :

    create database horde;
  5. Grant required permissions to the user horde :

    GRANT ALL ON horde.* TO 'horde'@'localhost';
  6. Restore a backup of horde database:

    "%plesk_dir%MySQL\\bin\\mysql.exe" -u<user_name> -p<password> -P3307 horde < C:\\db_backup\\horde.sql
  7. Correct the port in Horde configuration file:

    %plesk_dir%Webmail\\horde\\horde\\config\\conf.php

Sitebuilder database :

  1. Create a backup of sitebuilder5 database:

    "%plesk_dir%Mysql\\bin\\mysqldump.exe" -uadmin -P3306 sitebuilder5 > C:\\db_backup\\sitebuilder5.sql
  2. Enter MySQL 5.7 on port 3307:

    "%plesk_dir%MySQL\\bin\\mysql" -u<user_name> -p<password> -P3307
  3. Create the user sitebuilder :

    CREATE USER 'sitebuilder'@'localhost' IDENTIFIED BY '*****'
    • The password for the user can be obtained from %plesk_dir%\\sb\\config
  4. Create the database sitebuilder5 :

    create database sitebuilder5;
  5. Grant required permissions to the user sitebuilder :

    GRANT ALL ON sitebuilder5.* TO 'sitebuilder'@'localhost';
  6. Restore a backup of sitebuilder5 database:

    "%plesk_dir%"\\Mysql\\bin\\mysql.exe -u<user_name> -p<password> -P3307 sitebuilder5 < C:\\db_backup\\sitebuilder5.sql
  7. Correct the port in Site Builder configuration file:

    C:\\Program Files (x86)\\Parallels\\Plesk\\sb\\config

Spamassasin database :

  1. Create a backup of sa_bayes database:

    "%plesk_dir%"\\Mysql\\bin\\mysqldump.exe -uadmin -P3306 sa_bayes > C:\\db_backup\\sa_bayes.sql
  2. Enter MySQL 5.7 on port 3307:

    "%plesk_dir%\\MySQL\\bin\\mysql" -u<user_name> -p<password> -P3307
  3. Create the user sa_bayes :

    CREATE USER 'sa_bayes'@'localhost' IDENTIFIED BY '*****'
  4. Create the database sa_bayes :

    create database sa_bayes;
  5. Grant required permissions to the user sa_bayes :

    GRANT ALL ON sa_bayes.* TO 'sa_bayes'@'localhost';
  6. Restore a backup of the sa_bayes database:

    "%plesk_dir%"\\Mysql\\bin\\mysql.exe -u<user_name> -p<password> -P3307 sa_bayes < C:\\db_backup\\sa_bayes.sql
  7. Add the following string in SpamAssassin configuration file located at:

    "%plesk_dir%"\\Additional\\SpamAssassin\\etc\\mail\\spamassassin\\local

    DBI:mysql:spamassassin;host=localhost;port=3307

Have more questions? Submit a request
Please sign in to leave a comment.