For Linux and Shell scripting.

Repairing Webmail Error: “A fatal error has occurred DB Error: connect failed” to Log in


If you receive the following error during attempting to login into Webmail:

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

please make sure that the following line exists in the directory /etc/my.conf:


Also check that Mysql service is running and that the /var/lib/mysql/mysql.sock socket exists. Make sure that the Horde user is able to connect to the Horde database with a password from etc/psa/.webmail.shadow using the command:

# mysql -uhorde -p`cat /etc/psa/.webmail.shadow` -D horde

If /etc/psa/.webmail.shadow is missing, put some password into this file and change the password for the Horde user in the MySQL database using the query listed below. If you get the error, make sure that the only one Horde MySQL user exists in the user table in MySQL database and try to change its password with a MySQL query like:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D mysql
mysql> update user set password=password(“THE_PASSWORD_FROM_WEBMAIL.SHADOW”) where user=”horde”;

Look into the psa-horde log (by default: /var/log/psa-horde). If you see something like:

Nov 02 12:55:06 HORDE [emergency] [horde] DB Error: connect failed: [nativecode=Access denied for user: ‘root@localhost’ (Using password: NO)] ** Array [on line 1329 of “/usr/share/psa-horde/lib/Horde/DataTree/sql.php”]

make sure that sql.safe_mode is disabled in php.ini, such as:


Restart Apache after changes in php.ini have been made.


5 thoughts on “Repairing Webmail Error: “A fatal error has occurred DB Error: connect failed” to Log in

  1. Ty!! it’s working now!!! you saved me ๐Ÿ˜€

  2. sihccdpglenfdaxrwell, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ๐Ÿ˜‰

  3. Thanks for the post. We had the same issue, went through your instructions, but found that the problem was something else, which was that Horde was looking for a shadow password file in the wrong place. Here are some details, hopefully they’ll help somebody out:

  4. Pingback: Fix Db Error Connect Failed Horde Plesk Windows XP, Vista, 7, 8 [Solved]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s