Report this

What is the reason for this report?

Android app to access mysql database droplet

Posted on January 30, 2018

Hello, I’m trying to build an android app that connects to mysql droplet, is mysql a good choice for a small db table ? If yes is there any toturial I can follow ? Thank you



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

There are many Android apps for accessing MySQL databases. While I cannot recommend a particular one since I do not currently use any of them I can recommend that you look for one that offers MySQL over SSH.

This connection method connects to your droplet using SSH and then accesses MySQL locally. This is preferred because you do not have to make any configuration changes on your MySQL server nor do you have to have your MySQL server accessible (and potentially vulnerable) by listening on a public port.

On Ubuntu you can install MySQL or MariaDB (a compatible fork of MySQL) with:

MySQL:

apt-get update;
apt-get install mysql-server;

MariaDB:

apt-get update;
apt-get install mariadb-server

During the installation process you will be asked to create a password for the root MySQL user. You can then use this along with your ssh credentials to set up your android app to connect to your server.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.