0
votes

I have purchased a VPS from GoDaddy. I installed SQL Server on the VPS through remote desktop connection and could connect to the database. Login credentials used are ServerName:IPAddress, Username=sa; Password=****

However when I tried to connect to the remote database from my local machine I am getting the error as

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.

I have cross checked the following scenarios

  1. Made sure that TCP/IP is enabled
  2. Made sure that SQL Server Browser is running

How can I solve this issue ?

1
Could be that SQL Server Browser Service is not running. - Kumar_Vikas
Sql server browser is running and TCP/IP is enabled on remote machine - ksg

1 Answers

-2
votes

You may have to add the IP address of your local machine to the server. Setting the IP to accessible. For security reason, it is not allowed to access the server for all the host except the host with the IP address that was added to the whitelist.

You can find the instruction in this web page.

From the web page:

If you want to connect remotely to a database, you must enable support for remote connections.

  1. Log in to your GoDaddy account.
  2. Click Web Hosting.
  3. Next to the cPanel account you want to use, click Manage.
  4. In the Databases section, click Remote MySQL.
  5. In the Host field, enter the IP address from where you want to access your databases.
  6. Click Add Host.

What to enter...

Host Name or Server: Your database's host name
Port: 3306
Username: The database user's username
Password: The database user's password
Database: The name of the database