Android的直接用mysql连接器连接到MySQL数据库 [英] android connect to mysql database directly using mysql-connector

查看:157
本文介绍了Android的直接用mysql连接器连接到MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android应用程序,并要使用远程数据库进行数据storage.I有两种选择,先用php.Second选择一个REST API的使用直接连接到MySQL数据库使用JDBC使用mysql-connector-Java的5.1.18-bin.jar的。我不熟悉,第二个,但我想确认哪些方法是可行的,这是为什么?

I am working on an android app and have to use remote database for data storage.I have two options, first create a REST API using php.Second option is connect directly to mysql db with JDBC using mysql-connector-java-5.1.18-bin.jar. I am not familiar with second one but i want to confirm which method will be feasible and why?.

推荐答案

您无法使用第二(JDBC)方法与Android应用程序(SO <一个href="http://stackoverflow.com/questions/7221620/android-jdbc-not-working-classnotfoundexception-on-driver">Reference螺纹)。你必须使用REST API。

You can't use second (jdbc) method with android application (SO Reference thread). You have to use REST API.

这篇关于Android的直接用mysql连接器连接到MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆