Start a conversation

Getting 'Cannot connect to database' Error in GFI LanGuard Console

Overview

GFI LanGuard cannot access its backend database and the following error appears in the console: 'Cannot connect to database'

The secondary symptom can be some tabs within the console showing no data available.

Diagnosis

The 'Cannot connect to database' indicates a general connectivity problem with the SQL backend database. Possible causes are:

  • The SQL server is not started
  • Incorrect credentials configured for authenticating with the database (for example, due to changed password)
  • The account does not have the required permissions or is disabled

Prerequisites

An account that has the sysadmin role set within Microsoft SQL

Solution

    1. Verify that the SQL server is running and accessible by an account that has the sysadmin role by using the SQL Server Management Studio to connect to it or performing a general connectivity test.
    2. Open the GFI LanGuard console and navigate to the Configuration > Database Maintenance Options and click on Database backend settings.
      mceclip1.png
    3. Specify valid credentials of an account that has the sysadmin role set within Microsoft SQL.
      • If using Windows Authentication make sure the account used for the GFI LanGuard Attendant service has been added to Microsoft SQL Management Studio under Security > Logins and given the "sysadmin" server role
      • SQL SA account credentials are most likely to have permissions. If you keep getting permission errors it is recommended to use SA account credentials
    4. Click Ok and agree to the following prompts. If provided credentials are incorrect or do not have enough permissions, you will get an error, and have to return to step 3.
      mceclip3.png
    5. Once the credentials are validated, you will be prompted to restart LanGuard.
      mceclip4.png

Testing

 Once GFI LanGuard restarted the 'Cannot connect to database' error should be fixed.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments