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.
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
An account that has the sysadmin role set within Microsoft SQL
- 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.
- Open the GFI LanGuard console and navigate to the Configuration > Database Maintenance Options and click on Database backend settings.
- 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
- 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.
- Once the credentials are validated, you will be prompted to restart LanGuard.
Once GFI LanGuard restarted the 'Cannot connect to database' error should be fixed.