Home Database Mysql Tutorial 为什么不要在android或者ios上直连mysql或者sqlserver之类的数据

为什么不要在android或者ios上直连mysql或者sqlserver之类的数据

Jun 07, 2016 pm 03:52 PM
android ios mysql Why direct connection

许多同学 都有直连这些数据库的想法,如果我说了以下二个问题之后你还想直连,那我也没办法 数据库是一个服务端最重要的部分,也是最脆弱的部分,更是最敏感的部分 如果直连会造成如下问题 1.安全问题,你的连接数据库的账号密码 暴露给了客户端,这样很容易

许多同学 都有直连这些数据库的想法,如果我说了以下二个问题之后你还想直连,那我也没办法



数据库是一个服务端最重要的部分,也是最脆弱的部分,更是最敏感的部分


如果直连会造成如下问题

1.安全问题,你的连接数据库的账号密码 暴露给了客户端,这样很容易被抓到,无论是android的反编译,还是抓包,都很容易得到这个信息,而且如果需要直连,数据库势必要监听0.0.0.0,,这样任何人都可以尝试你的数据库,多么可怕的一件事


2.性能问题,我们知道一个数据库的并发连接很低,mysql的默认配置只有100,直连数据库,导致无法利用任何缓存 ,比如memcache,


应该还有其它问题,大家都来补充一下


3.不可控

如果一个sql 会把mysql 搞挂,我们甚至无法 让条sql 马上消失,,,只能关掉sql 来解决问题

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is the conversion speed fast when converting XML to PDF on mobile phone? Is the conversion speed fast when converting XML to PDF on mobile phone? Apr 02, 2025 pm 10:09 PM

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.

In Go, why does printing strings with Println and string() functions have different effects? In Go, why does printing strings with Println and string() functions have different effects? Apr 02, 2025 pm 02:03 PM

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

xml online formatting xml online formatting Apr 02, 2025 pm 10:06 PM

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.

How to specify the database associated with the model in Beego ORM? How to specify the database associated with the model in Beego ORM? Apr 02, 2025 pm 03:54 PM

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...

Why is it necessary to pass pointers when using Go and viper libraries? Why is it necessary to pass pointers when using Go and viper libraries? Apr 02, 2025 pm 04:00 PM

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 do all values ​​become the last element when using for range in Go language to traverse slices and store maps? Why do all values ​​become the last element when using for range in Go language to traverse slices and store maps? Apr 02, 2025 pm 04:09 PM

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: Why does it not report an error when single-element slice index 1 intercept? Go language slice: Why does it not report an error when single-element slice index 1 intercept? Apr 02, 2025 pm 02:24 PM

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...

Does XML modification require programming? Does XML modification require programming? Apr 02, 2025 pm 06:51 PM

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.

See all articles