Question

Android app to access mysql database droplet

Posted January 30, 2018 2.2k views
JavaUbuntu 16.04

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

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.

×
1 answer

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.

Submit an Answer