Page 1 of 1

Connection to SQL Database failed

Posted: Fri Jan 21, 2022 7:30 pm
by Durzo
Script URL: https://www.hesk.com/download.php
Version of script: 3.2.5
Hosting company: Local
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Database, SQL, connection, failed

Write your message below:
I am installing HESK on a local server using IIS to host it. I have an SQL server on another local machine that is set up and configured to accept connections from the machine that HESK is set up on. There is another existing application also running on IIS on the same machine and also connecting to the same SQL server and it runs without a problem. I created a new database on the SQL server called "Knowledgebase" that I am trying to connect HESK to. I am getting an error though and cannot figure out why.
Database connection failed:

Double-check all the information below. Contact your hosting company for the correct information to use!

MySQL said: No connection could be made because the target machine actively refused it
Error shown in image as well.
Image
(https://imgur.com/a/PKMHysP)

I have tried verifying the server name, it seems to be correct and is the same as the other application using the same SQL server uses.
I have tried ensuring that the login information is correct, it is.
I do not have a physical or software firewall preventing the connection. This is also evident by the other application successfully connecting.

Thank you for any help or advice you can offer!

Re: Connection to SQL Database failed

Posted: Sat Jan 22, 2022 4:26 pm
by Klemen
Unfortunately this is not something that can be fixed from within Hesk.

This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port.

To fix this I presume you will need to adjust the configuration on your external SQL server. What exactly is wrong - not sure, but I'd suggest searching the web for the MySQL error "No connection could be made because the target machine actively refused it" and for something like "mysql server allow external connections"