为什么不要在android或者ios上直连mysql或者sqlserver之类的数据
许多同学 都有直连这些数据库的想法,如果我说了以下二个问题之后你还想直连,那我也没办法 数据库是一个服务端最重要的部分,也是最脆弱的部分,更是最敏感的部分 如果直连会造成如下问题 1.安全问题,你的连接数据库的账号密码 暴露给了客户端,这样很容易
许多同学 都有直连这些数据库的想法,如果我说了以下二个问题之后你还想直连,那我也没办法
数据库是一个服务端最重要的部分,也是最脆弱的部分,更是最敏感的部分
如果直连会造成如下问题
1.安全问题,你的连接数据库的账号密码 暴露给了客户端,这样很容易被抓到,无论是android的反编译,还是抓包,都很容易得到这个信息,而且如果需要直连,数据库势必要监听0.0.0.0,,这样任何人都可以尝试你的数据库,多么可怕的一件事
2.性能问题,我们知道一个数据库的并发连接很低,mysql的默认配置只有100,直连数据库,导致无法利用任何缓存 ,比如memcache,
应该还有其它问题,大家都来补充一下
3.不可控
如果一个sql 会把mysql 搞挂,我们甚至无法 让条sql 马上消失,,,只能关掉sql 来解决问题

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The speed of mobile XML to PDF depends on the following factors: the complexity of XML structure. Mobile hardware configuration conversion method (library, algorithm) code quality optimization methods (select efficient libraries, optimize algorithms, cache data, and utilize multi-threading). Overall, there is no absolute answer and it needs to be optimized according to the specific situation.

The difference between string printing in Go language: The difference in the effect of using Println and string() functions is in Go...

XML Online Format Tools automatically organizes messy XML code into easy-to-read and maintain formats. By parsing the syntax tree of XML and applying formatting rules, these tools optimize the structure of the code, enhancing its maintainability and teamwork efficiency.

Under the BeegoORM framework, how to specify the database associated with the model? Many Beego projects require multiple databases to be operated simultaneously. When using Beego...

Go pointer syntax and addressing problems in the use of viper library When programming in Go language, it is crucial to understand the syntax and usage of pointers, especially in...

Why does map iteration in Go cause all values to become the last element? In Go language, when faced with some interview questions, you often encounter maps...

Go language slice index: Why does a single-element slice intercept from index 1 without an error? In Go language, slices are a flexible data structure that can refer to the bottom...

Modifying XML content requires programming, because it requires accurate finding of the target nodes to add, delete, modify and check. The programming language has corresponding libraries to process XML and provides APIs to perform safe, efficient and controllable operations like operating databases.
