dongtong7990 2015-05-13 14:17
浏览 50
已采纳

Raspberry PI作为数据库服务器

I have a question regarding my database and being able to use my db everywhere.

So currently me and some friends are developing an application for android, this application reads alot from his data from a MySQL Database.

Currently we are working on the database design and tought by ourself, how to keep this DB open(24/7) to the app(for the users) and still keep it safe.

My tought is as follow, lets try to run the MySQL database on a Raspberry PI 2.

In our opinion this was do able, but we don't know how to start this.

We can't let the APP give access to the DB because anyone who decompiles our application will get access to our DB. It has to be safe!

So there has te be some portal (php?) In front of the DB who handles the incoming query's

Any suggestions?

  • 写回答

3条回答 默认 最新

  • dqy006150 2015-05-13 14:26
    关注

    You can build a REST API on your Raspberry PI with PHP and let your app access the database through this API. To make sure that the API can only be accessed from allowed sources you can add a middleware to the REST API to use something like an API-key to control the access.

    The data that you pull from the API could be formated as XML or JSON.

    Here is a micro framework for a PHP REST API: SlimFramework

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”