简体   繁体   English

我可以将网站连接到我的个人计算机SQL Server数据库吗?

[英]Can I connect my website to my personal computer SQL Server database?

I already have an website on godaddy, So can I connect SQL Server database (Database is in my home PC) from website which is already launched in godaddy. 我已经在godaddy上拥有一个网站,因此我可以从在godaddy中启动的网站连接SQL Server数据库(数据库在我的家用PC中)。 I did my website using Asp.net. 我使用Asp.net建立了我的网站。

If can, what are all the things I should give importance? 如果可以的话,我应该重视什么?

Note: My database is not huge. 注意:我的数据库不是很大。

Please help me. 请帮我。

Technically speaking yes you can, should you..unless your home computer is a server, no. 从技术上讲是可以的,除非您的家用计算机是服务器,否则。 You would have to ensure that you have a static IP address and allow 1433 through your firewall. 您必须确保您具有静态IP地址,并允许1433通过防火墙。 honestly its not that costly to get a cloud sqlserver and hook to that, discountasp.net has really good service. 老实说,获得云sqlserver并花费不那么多,Discountasp.net确实提供了很好的服务。

Technically you can do it. 从技术上讲,您可以做到。 I assume you want to know how to connect to it. 我假设您想知道如何连接它。

  1. Set a static IP for you computer ex: 192.168.1.105 (make sure you are on the same subnet as your default gateway. 为您的计算机设置一个静态IP,例如:192.168.1.105(确保您与默认网关位于同一子网中。
  2. Open the firewall for your sql server. 打开您的sql服务器的防火墙。
  3. Go into router settings and do port forwarding to the static IP (from step 1) and the port of your SQL server ex: 1433 进入路由器设置,然后将端口转发到静态IP(从步骤1开始)和SQL Server的端口,例如:1433
  4. Connect your website to the database using public IP (google what is my ip) example: 123.123.123.12:1433 使用公共IP(谷歌是我的IP)将您的网站连接到数据库:123.123.123.12:1433

This should work. 这应该工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将我的silverlight应用程序与SQL Server 2005连接 - How can I connect my silverlight application with SQL server 2005 无法使用IIS访问我的网站中的SQL Server数据库 - Cannot access my SQL Server database in my website using IIS 将ASP.Net应用程序从Web连接到计算机上的sql数据库 - Connect ASP.Net application from web to my sql database on my computer 如何将 SQL Server 数据库连接到我的电子邮件系统? - How do I connect the SQL Server database to my e-mail system? 我无法使用“host.docker.internal:some-port”将我的 ASP .NET 应用程序从 Docker 容器连接到我的计算机主机数据库 - I can't connect my ASP .NET app from Docker-container to my computer host database with "host.docker.internal:some-port" Web管理工具:无法连接到另一台计算机上的SQL Server数据库 - Web Administration Tool: Unable to connect to SQL Server database on another computer 将我的Web服务器上的asp.net应用程序连接到另一台服务器上的sql数据库的方法? - Ways to connect my asp.net application on my web server to a sql database on another server? 如何将我的SQL Server数据库与MVC自动实现的mdf数据库合并 - How can I merge my SQL Server database with MVC auto implemented mdf database 如何在服务器(个人笔记本电脑)上使用SQL Server数据库托管Asp.net网站 - How to host Asp.net website with SQL Server database on server (personal Laptop) 如何通过我的IP地址从远程计算机访问本地托管的IIS网站? - How Can I Access Locally Hosted IIS WebSite from Remote Computer By My IP Address?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM