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 mmocr的训练错误,结果全为0
    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀