Tools
WHD error: Unable to connect to database
This article describes how to resolve the following error: Unable to connect to database.
First published date
Last published date
Overview
The following error displays in the Web Help Desk Console.
Unable to connect to database.
The resolution steps below can be used for MySQL and MSSQL.
Product section
Cause
The MySQL Java Database Connector (JDBC) driver is not installed on the Web Help Desk Server. To ensure compliance with MySQL licensing restrictions, the MySQL JDBC driver is not bundled with Web Help Desk.
The MSSQL service is not running or not accepting connections.
Resolution
If you are connecting to a MySQL database (used for some asset discovery connections), download and install the MySQL JDBC driver from the MySQL website.
- Log in to the Web Help Desk server as an administrator.
- Stop the Web Help Desk service.
- Open a web browser and navigate to the MySQL website (© 2018, Oracle Corporation and/or its affiliates, available at https://dev.mysql.com/, obtained on November 20, 2018.)
- Locate and download the Platform Independent driver. Look for version 5.1.49 if you use MySQL 5.7 (Please use the latest MySQL JDBC 8.0.33 driver for WHD version 12.7.13 up to the latest if you use MySQL 8).
- Unzip the file to a local directory.
- Copy the JDBC driver to the appropriate directory on your server specified below for its respective operating system.
Please note:
For version 8.0.19 and above of the JDBC driver:
The allowable versions of TLS protocol used for connecting to the server, when no restrictions have been set using the connection properties enabledTLSProtocols, have been changed to:
- TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3 for MySQL Community Servers 8.0, 5.7.28 and later, and 5.6.46 and later, and for all commercial versions of MySQL servers.
- TLSv1 and TLSv1.1 for all other versions of MySQL servers.
For version 5.1.49 of the JDBC driver:
The allowable versions of TLS protocol used for connecting to the server, when no restrictions have been set using the connection properties enabledTLSProtocols, have been changed to:
- TLSv1, TLSv1.1, and TLSv1.2 for MySQL Community servers 8.0, 5.7.28 and later, and 5.6.46 and later, and for commercial versions of MySQL Server 5.6, 5.7, and 8.0.
- TLSv1 and TLSv1.1 for all other versions of MySQL servers.
5.1.49
8.0.19
8.0.33
Version 12.6 and lower
| Operating System | Path |
| Windows Server | \Program Files\WebHelpDesk\bin\jre\lib\ext |
| macOS | /Library/Java/Extensions |
| Linux | /usr/local/webhelpdesk/bin/jre/lib/ext |
Version 12.7 and higher
| Operating System | Path |
| Windows Server | \Program Files\WebHelpDesk\bin\webapps\helpdesk\WEB-INF\lib |
| macOS | /Library/WebHelpDesk/bin/webapps/helpdesk/WEB-INF/lib |
| Linux | /usr/local/webhelpdesk/bin/webapps/helpdesk/WEB-INF/lib |
=====================
- Verify the configured port used by the MSSQL server, typically 1433. Some installations use dynamic ports, and they should use a static port instead, generally port 1433.
- Ensure that the firewall does not block the port
- If the service is not started, restart it through services.msc
- If the MSSQL service is started, restart the Web Help Desk service and see if it connects
- If the MSSQL service does not want to start, reboot the server.
- After rebooting the server, wait for about 3 minutes for the MSSQL service to settle.
- Restart the WHD service.
- If the MSSQL service does not start after a reboot, troubleshoot the issue with your database administrator.