Unable to log in to Webmail: A fatal error has occurred DB Error: connect failed

Created:

2016-11-16 12:46:43 UTC

Modified:

2017-04-24 11:16:05 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to log in to Webmail: A fatal error has occurred DB Error: connect failed

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk

Symptoms

Unable to login to webmail:

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

Resolution

Make sure that /etc/my.cnf includes the following line:

socket=/var/lib/mysql/mysql.sock

Also verify 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 in Parallels Plesk Panel 8.x or /etc/psa-webmail/horde/.horde.shadow in Parallels Plesk Panel 9.x, 10.x, 11.x. You may use the following commands to verify that log in is possible:

Plesk 8.x:

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

Plesk 9.x, 10.x, 11.x:

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

If the file /etc/psa-webmail/horde/.horde.shadow (or /etc/psa/.webmail.shadow for Panel 8.x) is missing, put a password into this file and change the password for the "horde" user in the "mysql" database using the query listed below.

If you get an error, make sure that only one "horde" MySQL user exists in the "user" table of the "mysql" database, and try to change its password with a MySQL query such as:

~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
mysql> update user set password=password("THE_PASSWORD_FROM_WEBMAIL.SHADOW") where user="horde";
mysql> FLUSH PRIVILEGES;

Look at the "psa-horde" log (by default: /var/log/psa-horde). If you see something similar to:

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. It should look like:

sql.safe_mode=Off

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

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