douhu2890 2015-10-02 11:49
浏览 47

MySQL数据库和Android应用程序设置

I am creating a recipe app on Android. This will have various features including a search box which the users enters in a keyword and it will display a matching recipe from a database. I plan on having thousands of recipes from around the world.

So far, from my research, I've learned that it's possible to have a Web Service between the MySQL database and the android application and have the communication via the WS. At first I was going to deploy this on my host computer but I ran into an issue.

I saw this question on StackOverflow and it's worrying me a little

Can I run mySQL when my computer is off?

If I do go for a localhost database, it will be running off my computer. My app would not be able to access the database when my computer is switched off, so I'd end up having to run it 24/7 which I am not prepared to do.

Alternatively, I have a Virtual Machine (from a hosting company), which I access using RDP, this uses Windows 2012 Server R2. This is probably the best option as it's very powerful and my server will continue to run as long as the network doesn't go down.

The problem is, because it's a Virtual Machine running on VMWare, it doesn't support virtualization so I can't run my Android emulator on there (i have tried). See below:

Not Inside a VM - You cannot run a VM-accelerated emulator inside another virtual machine, such as a VirtualBox or VMWare-hosted virtual machine. You must run the emulator directly on your system hardware.

Recently, I planned on using my host computer to communicate with the MySQL database located on the VM (through the webservice on the VM). But they are not on the same network, so how can I do this?

What other feasible method can I use to set up everything? Please correct me if I misunderstood anything about how localhost or VMs work. I'm new to Android apps and networks so it's quite confusing to me.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料