Local database (SQL Server) remote connection server-side server

https://www.cnblogs.com/yougmi/p/4616273.html

 

Local database (SQL Server 2012) The database connected to the external network server needs to be configured as follows:

1. The first is to open the configuration management tool of the data

2. Configure the relevant client protocols and enable TCP/IP

3. The default remote port of the database is 1433, but it is not safe. You can manually change the port, and wait for the IP of the client protocol.

 

Here you need to find the IPAll at the bottom, and then modify the port. After modification, restart the database service -------------------------------- --------------------------------------------

4. After the configuration here is done, log in to the database locally, then right-click on the database service and select Properties, then select [Link], and check Allow remote

5. After this, continue to right-click on the database service, select [Register], and register a database service

You can test first, then save, the test is successful, it proves that you can log in remotely with this account -------------------------

 

6. After the above steps are completed, you need to modify the settings of the firewall. Of course, if the server is directly closed, there is no need to configure it, but generally speaking, for safety reasons, the server should not close the firewall.

(1). The first is to add a port to the firewall (here is the server port number you set, the default is 1433)

Open Control Panel-->Windows Firewall-->Advanced Settings-->Push Rules-->Right click, New Rule-->Select Port-->Set Specific Local Port Number-->Allow Links-->Check All Item --> Set Name --> Done

.......

(2). After the first step, the firewall continues to create new stack rules, this time select Add Program, add D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe

Here sqlservr.exe is in the folder where you installed the database

  Add the same steps as above

 

Then, through the above configuration, we can access the database on the external network locally, just enter the corresponding IP address and port number, login name, and password.

Note here is the database server format: IP address, port number

',' separator used between IP address and port number

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325264400&siteId=291194637