直接从iPad应用程序(不是通过PHP等)连接到MySQL [英] Connect to MySQL directly from an iPad app (not via PHP, etc.)

查看:1156
本文介绍了直接从iPad应用程序(不是通过PHP等)连接到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在任何人有机会之前:是的,我知道这是一个坏主意。请不要告诉我如何使用Web服务。谢谢。

Before anyone has a chance: Yes, i know it's a bad idea. Please, don't give me a lecture on how i should use a web service instead. Thanks.

那么,怎么办呢?

我发现这个位 http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ 并认为它可能会做诀窍。我收到了一堆ARC错误消息,清除了那些并在运行时出现此错误:

I found this bit http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ and thought it might do the trick. I got a bunch of ARC error messages, cleaned those out and got this error at runtime:


检测到在系统中调用符号的尝试iPhone上没有
的库:pthread_cond_init $ UNIX2003从图片oms中的函数
my_thread_init调用。

Detected an attempt to call a symbol in system libraries that is not present on the iPhone: pthread_cond_init$UNIX2003 called from function my_thread_init in image oms.

我需要使用像ODBC / C这样的东西吗?

Do i need to use something like ODBC/C?

我知道解决方案可能很冗长,没关系。如果有人能够至少指出我正确的方向,那将会很棒。

I know that the solution might be a lengthy one, that's fine. Would be great if someone could at least point me in the right direction.

编辑:

由于人们渴望知道选择不使用网络服务的原因,这里它是:

Since people are keen to know the reason for opting not to use a web service, here it is:

如果您正在创建内部应用程序,则增加的Web服务安全性几乎为零。直接使用DB意味着我需要维护更少的代码。另外,我不需要创建hacky PHP脚本来完成任务。

If you're creating an in-house app, the added security of a web service is next to nothing. Working directly with the DB means i need to maintain less code. Plus i don't need to create hacky PHP scripts to get things done.

最终结论:

I我想给那些即将做同样事情的人留言:不要:)
基本上你的选择是hacky服务器端脚本或你自己构建的Oracle专有mysql客户端(因此也是一个hacky解决方案) )。你的选择,但我强烈反对它。

I wanted to leave a message for people who're about to do the same thing: Don't :) Essentially your options are hacky server side scripts or Oracle proprietary mysql client you built yourself (and thus a hacky solution as well). Your choice but i'd strongly advice against it.

推荐答案

这可能是你要找的东西:

This might be the sort of thing that you are looking for:

iphone和osx的mysql

我在iphonedevsdk帖子中找到了它访问mysql远程数据库iphone

I found it on this iphonedevsdk thread access mysql remote database iphone

我个人只会这样做如果你真的真的想要。

Personally I would be only doing this if you really really wanted to.

如果你想要一个罐装解决方案,我也发现了这个: Flipper

If you wanted a canned solution, I also found this: Flipper

或者自己动手:为iPhone / iPad构建MySql客户端库

它真的不那么难找到一些解决方案

Its not really that hard to find a number of solutions

这篇关于直接从iPad应用程序(不是通过PHP等)连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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