Could not connect to database for SQL SessionHandler

When you try to login in Horde you see this error:

A fatal error has occurred
Could not connect to database for SQL SessionHandler.
Details have been logged for the administrator.

There are some different reasons that causes this error. This is a checklist to solve the problem.


First, check the /etc/my.cnf and remove skip-innodb if its in there.

Second, repair Horde database

mysqlcheck --auto-repair horde

Third, enter mysql and check what socket file is using mysql:

# mysql
mysql> show variables like 'socket';

You must see something like this:

socket /var/lib/mysql/mysql.sock

Edit the config file:

vi /usr/local/cpanel/base/horde/config/conf.php

Change the following two lines from:

$conf['sql']['hostspec'] = ‘localhost’;
$conf['sessionhandler']['params']['hostspec'] = ‘localhost’;

to:

$conf['sql']['hostspec'] = ‘localhost:/var/lib/mysql/mysql.sock’;
$conf['sessionhandler']['params']['hostspec'] = ‘localhost:/var/lib/mysql/mysql.sock’;


COMENTA

Tags disponibles: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top