[英]Using direct MySql connection in app - C#
I have developed an app, which more than 2k users are going to use it. 我已经开发了一个应用程序,将有超过2k的用户使用它。 This app is connected to a database which contains some data. 该应用已连接到包含某些数据的数据库。 I have some questions: 1. Is it ok to use mysql direct connection in app instead of API for just reading data? 我有一些问题:1.是否可以在应用程序中使用mysql直接连接代替API来仅读取数据? 2. Is there a way that someone find my server's information (address, pass, etc) from my application? 2.有人可以从我的应用程序中找到我的服务器信息(地址,通行证等)吗?
App is wpf. 应用是wpf。
Generally speaking (and as with all generalities there are all kinds of exceptions here, in both directions) it's okay to connect directly to the database if one of these two conditions is met: 一般而言(与所有通用性一样,双向都有各种例外),如果满足以下两个条件之一,则可以直接连接到数据库:
or 要么
and if one of these conditions is also met: 并且如果还满足以下条件之一:
or 要么
or 要么
It is not generally okay to connect directly to a database over the public Internet, or within a local network where traffic to the database is not adequately protected, and it is not generally okay to let end users have direct access to the database separate from the application (and if a user has ownership of their machine, they will be able to get that access). 通常无法通过公共Internet或在未充分保护数据库流量的本地网络内直接连接到数据库,并且通常不允许最终用户直接访问数据库而不直接访问数据库。应用程序(如果用户拥有其计算机的所有权,则他们将能够获得该访问权限)。
I also need to expound on what I mean by "adequately protected". 我还需要解释“充分保护”的含义。 This involves a few things: 这涉及几件事:
If you save the information inside your application, it can be found. 如果将信息保存在应用程序内部,则可以找到它。 You should consider using an API to handle the data reading. 您应该考虑使用API来处理数据读取。 Applications can be reverse engineerd. 可以对应用程序进行逆向工程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.