如何连接Android和MySQL服务器? [英] how to connect android and mysql server?
问题描述
我想在Android的来自网络的mysql DATABSE的细节。
我已经写了一个PHP脚本来获取细节形成MySQL数据库和转换结果作为JSON字符串,并使用某种方法提取的android的细节。
我是新android开发,我认为应该有一些简单的方法来做到这一点。如果是的话,请让我知道。
I want to get the details from online mysql databse in android. I have wrote a php script to get the details form mysql database and convert the result as json string and extract the details in android using some sort of methods. I am new to android development I think there should be some simple way to do this. if so please let me know.
推荐答案
您可以使用纯JDBC API和JDBC连接器,只有一个我知道工作是使用mysql-connector-java的3.0.17-GA-bin.jar。请记住,直接在云中露出一个数据库是一个严重的安全隐患,如密码和连接详细旅行不加密。最好的办法是实行适当方案的REST或SOAP的Web服务。
You can use plain JDBC API with JDBC connector, only one I know is working is mysql-connector-java-3.0.17-ga-bin.jar. Bear in mind that exposing a database directly in the cloud is a serious security risk, as passwords and connection details travel without encryption. Best solution would be to implement a REST or SOAP web service with proper scheme.
检查这个答案与<一个href=\"http://stackoverflow.com/questions/4810116/android-mysql-using-com-mysql-jdbc-driver/6554930#6554930\">example JDBC API连接
Check this answer with an example of JDBC API connection
这篇关于如何连接Android和MySQL服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!