Article ID: 1356, created on Oct 6, 2008, last review on Jun 17, 2016

  • Applies to:
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.0 for Windows
  • Plesk 10.4 for Windows


While logging in to Horde webmail, the following appears:

    A fatal error has occurred
    DB Error: connect failed
    Details have been logged for the administrator.


Such an error occurs when Horde cannot connect to database storage. On Plesk server, Horde is integrated with client MySQL server. The exact reason cannot be determined using Horde log file %SystemRoot%\Temp\horde.log. Possible reasons are listed below:

In C:\Windows\Temp\horde.log, you see an error similar to:

  1. MySQL server is down:

    HORDE [emergency] [horde] DB Error: connect failed:  [nativecode=Can't connect to MySQL server on 'localhost' (10061)] ** Array [on line 1259 of "C:\Inetpub\vhosts\webmail\horde\lib\Horde\DataTree\sql.php"]
  2. The server 'servername' is invalid or does not exist:

    HORDE [emergency] [horde] DB Error: connect failed:  [nativecode=Unknown MySQL Server Host 'servername' (11004)] ** Array [on line 1259 of "C:\Inetpub\vhosts\webmail\horde\lib\Horde\DataTree\sql.php"]
  3. The credentials for MySQL server are incorrect:

    HORDE [emergency] [horde] DB Error: connect failed:  [nativecode=Access denied for user 'horde'@'localhost' (using password: YES)] ** Array [on line 1259 of "C:\Inetpub\vhosts\webmail\horde\lib\Horde\DataTree\sql.php"]
  4. The Horde database does not exist:

    HORDE [emergency] [horde] DB Error: no such database:  [nativecode=Unknown database 'horde'] ** Array [on line 1259 of "C:\Inetpub\vhosts\webmail\horde\lib\Horde\DataTree\sql.php"]


You need look at the the Horde configuration file %plesk_vhosts%webmail\horde\config\conf.php

Find $conf['sql'] section. Check the following variables:

    $conf['sql']['phptype'] – type of SQL server 
    $conf['sql']['port'] – port for connection
    $conf['sql']['protocol'] – protocol for connection
    $conf['sql']['hostspec'] – SQL server IP address or FQDN
    $conf['sql']['username'] – SQL user for horde authentication
    $conf['sql']['password'] – SQL user password
    $conf['sql']['database'] – horde database in SQL server
    $conf['sql']['charset'] – MySQL character set

Example of $conf['sql'] section.

    $conf['sql']['phptype'] = 'mysql';
    $conf['sql']['port'] = 3306;
    $conf['sql']['protocol'] = 'tcp';
    $conf['sql']['hostspec'] = 'localhost';
    $conf['sql']['username'] = 'horde';
    $conf['sql']['password'] = 'webmail639';
    $conf['sql']['database'] = 'horde';
    $conf['sql']['charset'] = 'utf-8';
  1. Check MySQL server in $conf['sql']['hostspec']. It should be up and running. If it is not, open 'services.msc' console and start MySQL Server service (set its startup type to Automatic).

  2. Specify correct server address in $conf['sql']['hostspec'].

  3. Configure $conf['sql']['username'] and $conf['sql']['password'] for MySQL server. To do so, connect to $conf['sql']['hostspec']: $conf['sql']['port'] (e.g. localhost:3306) as SQL server administrator and perform the following queries:

    mysql> REPLACE INTO `mysql`.`user` VALUES ('%','horde',password('password'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);
     mysql> REPLACE INTO `mysql`.`tables_priv` VALUES ('%','horde','horde','horde_users','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','horde_prefs','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','horde_datatree','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','horde_datatree_attributes','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','horde_tokens','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','horde_vfs','root@localhost','2006-07-19 12:15:26','Select,Insert,Update,Delete',''),('%','horde','horde','turba_objects','root@localhost','2006-07-19 12:15:27','Select,Insert,Update,Delete','');

(the password should be equal to $conf['sql']['password']).

4. Recreate the Horde database. It can be done using a query in the attached file: MySQL administrator privileges are required for it.

Search Words

horde can not connect to database storage

webmail error

A fatal error has occurred DB Error: connect failed

Horde error

Horde issue


log into horde webmail

error connecting webmail


a914db3fdc7a53ddcfd1b2db8f5a1b9c 85a92ca67f2200d36506862eaa6ed6b8 56797cefb1efc9130f7c48a7d1db0f0c 29d1e90fd304f01e6420fbe60f66f838 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7 aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f 514af229ae32522202a910a2649c80fb bd7fc88cf1b01f097749ae6f87272128 ff5a00b8ead2e480367b019417a04207 c796c01d6951fa24ed54c7f1111667c6

Email subscription for changes to this article
Save as PDF