Report this

What is the reason for this report?

Access managed mysql database from Mobile app

Posted on October 18, 2019

hi, right now i have a droplet with plesk. It uses a mysql database and my mobile app use php api to access the database.

Anyway to access the new managed mysql database from my app directly without the droplet. Any api and programming language to run query on the database for my mobile app.

Thanks.



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.

@BinuJohn

I’m afraid I don’t fully understand what you’re asking about.

If you’re asking if your own authored application can connect directly to MySQL; What language is your Mobile Application written in? It’s likely to have native database connector that you can use to run queries against a DO Managed Database Instance.

BR

andmoo

As far as I know, it is not advisable to access the managed database directly from a mobile app. For instance, if you are distributing the app to a lot of users, later, the login credentials may be leaked.

The best way is to create a web resource( you can use PHP and JSON) to make the API.

Thanks for your answer.

If you’re asking if your own authored application can connect directly to MySQL; Yes.

I am using java, but i dont to hardcode the mysql username and password within the app. i think its not safe.

any other ways?

Binu

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.