Mod_python error: "PythonHandler invenio.webinterface_layout"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/invenio/webinterface_handler.py", line 298, in _profiler
    return _handler(req)

  File "/usr/lib/python2.4/site-packages/invenio/webinterface_handler.py", line 316, in _handler
    return root._traverse(req, path)

  File "/usr/lib/python2.4/site-packages/invenio/webinterface_handler.py", line 210, in _traverse
    result = _check_result(req, obj(req, form))

  File "/usr/lib/python2.4/site-packages/invenio/websearch_webinterface.py", line 311, in __call__
    (auth_code, auth_msg) = check_user_can_view_record(user_info, self.recid)

  File "/usr/lib/python2.4/site-packages/invenio/search_engine.py", line 213, in check_user_can_view_record
    record_primary_collection = guess_primary_collection_of_a_record(recid)

  File "/usr/lib/python2.4/site-packages/invenio/search_engine.py", line 2370, in guess_primary_collection_of_a_record
    dbcollids = get_fieldvalues(recID, "980__a")

  File "/usr/lib/python2.4/site-packages/invenio/search_engine.py", line 2431, in get_fieldvalues
    res = run_sql(query)

  File "/usr/lib/python2.4/site-packages/invenio/dbquery.py", line 231, in run_sql
    db = _db_login(relogin = 1)

  File "/usr/lib/python2.4/site-packages/invenio/dbquery.py", line 110, in _db_login
    use_unicode=False, charset='utf8')

  File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)

  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)

OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")