0

I'm trying to connect to my remote mssql server for my GunZ private server, but for some reason i get the following error


Cannot connect to 94.xx.xx.xx.


ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Microsoft SQL Server, Error: 10054)

I pinged the port using an online port checker it said the port was open. The Service is running The firewall is disabled(since the system is on a virtual machine) and tcp/ip has been enabled in the configuration manager allow remote connections is enabled Listen all is enabled

Dylan Dodds
  • 1
  • 1
  • 2
  • What version is the client version that you are using and what version of SQL is the server using? If your client is behind compared to the server it does produce this type of error. – Zero Apr 08 '13 at 01:03

1 Answers1

1

As the error message tells you, the problem is not the firewall or the remote connections, but the login process.

Since you're connecting from PHP, try password authentication instead of Windows Authentication (note that by default, password authentication is disabled for Microsoft SQL Server). PHP with Windows Authentication may be a pain, at least it was a few years ago when I tried to make it work, wasted a few days and never achieved to make it work.

If you're already using password authentication, check that it is enabled in Microsoft SQL Server itself.

If this doesn't help:

  • Check the Microsoft SQL Server logs. Sometimes, they contain interesting stuff when the authentication is not working for an obscure reason.

  • Some advise to check whether Shared Memory, Named Pipes and TCP/IP are all enabled, so check this one too (in SQL Server Configuration Manager).

  • Make sure to read the article by Pinal Dave.

Arseni Mourzenko
  • 2,275
  • 5
  • 28
  • 41
  • i am connecting with password authentication and I am getting this error trying to connect from SSMS 2008 the php code is just not connecting – Dylan Dodds Apr 08 '13 at 01:22
  • 1
    Make sure password authentication is enabled in Microsoft SQL Server. – Arseni Mourzenko Apr 08 '13 at 01:24
  • that's how I usually connect through the local host So it should already be enabled from installation – Dylan Dodds Apr 08 '13 at 01:30
  • some tutorials are telling me to add \SQLEXPRESS (my server name) to the end of my tags but if I do it gives me this error instead :: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1) – Dylan Dodds Apr 08 '13 at 01:38