java 如何将 Android 应用程序连接到 MySql 数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42428066/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 06:37:38  来源:igfitidea点击:

How to connect a Android app to a MySql database

javaphpandroidmysql

提问by sbowde4

My question is simple, almost all the answers I find have been deprecated. What is currently the best way to connect an Android App to a MySQL database?

我的问题很简单,我找到的几乎所有答案都已被弃用。目前将 Android 应用程序连接到 MySQL 数据库的最佳方式是什么?

回答by Saarang Tiwari

I once created an application following this tutorial on YoutubeHow to Connect Android with PHP, MySQL - Best Android Studio Tutorial

我曾经按照Youtube 上的这个教程创建了一个应用程序How to Connect Android with PHP, MySQL - Best Android Studio Tutorial

I would like you to watch this, it is gonna help you a lot.

我想让你看这个,它会对你有很大帮助。

Please let me know if it helps you!!!

如果对你有帮助,请告诉我!!!

回答by nico91

I believe the general opinion will be any kind of api to mediate between the database and the app. Never connect directly to it. A REST api served by a php server should make it, given you added the php tag on purpose

我相信一般的意见将是在数据库和应用程序之间进行调解的任何类型的 api。切勿直接连接到它。由 php 服务器提供的 REST api 应该可以,因为您是故意添加 php 标签的