How can i connect my Android app with the online mysql database?

i am developing an android application which needs to connect with an online MySQL database. I have created an amazon aws account and set up an RDS MySQL database but i don’t know how to send http requests from android app to database.

I think i need to create some web services in order to send http requests but is that possible when using amazon’s rds service?

Thank you all for your answers.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

From a security perspective, it is not advisable to connect mobile apps directly to a database.

Mobile apps should connect to your application back-end that would perform authentication and determine what data the mobile user is entitled to access. The back-end can then retrieve the appropriate information from the database and return appropriate data to the app.

This also separates your application logic from the storage layer, allowing you to change information that is sent to/from the mobile apps without having to modify the code in every copy of the mobile app. You could also swap-out the database without having to change the mobile app.

Method 2

it’s probably not the best design to have clients connecting to your database remotely. The best thing to do would be to put a REST API on AWS that interacts with your database.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x