使用 DSN ODBC 从多台远程计算机连接到 ONLINE MySQL 数据库

发布于 2024-11-14 16:02:49 字数 597 浏览 4 评论 0原文

我的网站位于我的共享托管服务器上。我有一个 C# .NET Winform 应用程序,它访问我网站的在线 MYSQL 数据库。

为了访问在线数据库,我必须添加应用程序访问数据库的PC的IP。但这还没有完成,对于运行应用程序的每台电脑,我需要在我的服务器上手动添加该机器的 IP。

我按照以下步骤添加 IP:

 1. Login to the CPANEL of my website
 2. Goto Remote MySQL 
 3. Add Access Host

我想自动执行此手动任务吗?有什么办法吗?由于IP是动态的,所以我如何手动添加每个IP,这是不可能的。请帮助

我应该为 IP 添加通配符“%”吗? 211.137.%.% 但是,211.137——他们不会改变吗?

IP 地址中开始的两个条目指的是什么......xyzp

'x' 和 'y' 指的是什么?它们保持静态吗?

该应用程序将在多台机器上运行。那么我应该这样做: 访问所有匿名 IP --->我应该从 Cpanel 在 MySQL Remote 中添加此访问主机吗-----> %.%.%.%

I have my website on my share hosting server. I have a C# .NET Winform application which accesses the online MYSQL database of my website.

For accessing the online database, I have to add the IP of the PC from which the application accesses the database. But this is not done, for every PC on which the application would be run , i would need to maually add the IP of that machine , on my server .

I add the IP following these steps:

 1. Login to the CPANEL of my website
 2. Goto Remote MySQL 
 3. Add Access Host

I want to automate this manual task? Is there any way? Since , the IPs would be dynamic, so how would i just keep adding every IP manually, its not possible. please help

Should i add wildcard '%' for the IP.
211.137.%.%
But , 211.137 ---will they not change?

What do the starting two entries refer to in the IP address............x.y.z.p

what do 'x' and 'y' refer to? do they remain static?

The application would be run on multiple machines. So shall i do this:
FOR ACCESS TO ALL ANONYMOUS IPs ---> shall i add this Access Host in MySQL Remote from Cpanel-------> %.%.%.%

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愛上了 2024-11-21 16:02:49

创建一个 Web 服务来访问数据库以获取运行 win forms 应用程序所需的信息,并且您不必担心添加 IP。

即使您自动添加 IP,您也需要某种其他形式的安全性来识别您的应用程序。而且,如果没有 X.509 证书之类的东西,就没有固定的方法来保护调用数据库的应用程序,因此黑客无法复制该方法。

至于“IP 范围中的前八位字节是否保持静态”问题。答案是一般,但如果这是在家庭用户的计算机上,随着时间的推移,他们可能会跳转到 ISP 使用的新块。商业客户也是如此,但您通常会看到很大的范围。如果您甚至可以尝试采用这种方法,您就必须了解您的客户。我想说这是有风险的。

Create a web service to access the database for the information necessary to run the win forms application and you don't have to worry about adding IPs.

Even if you automate the adding of IPs, you will need some other form of security to identify your application. And, sans something like X.509 certificates, there is no set way to secure the application calling the database so hackers cannot duplicate the methodology.

As far as "do the first octets in an IP range remain static" question. The answer is generally, but if this is on a home user's computer, it is possible, over time, that they will jump to a new block used by the ISP. The same is true of business customers, but you normally see a large range together. You would have to know your client if you could even try to adopt this methodology. I would say it is risky.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文