简体   繁体   中英

Connect to Mysql-Database - JDBC or PHP

I want to access my Mysql-Database in the App I want to share in the PlayStore later. But what is the best way to connect to this DB? I use JDBC because it is very easy and I do not need any other things like PHP-scripts.

But if I use JDBC in my App I have to give this API the Credentials like DB-URL, username and password. If anyone would decompile the App he could see this credentials. So i wonder how you would connect safe to a DB via Android Apps. Do i need to do it via PHP-Scripts which are on the server?

Thank you

For security reasons i would not access a database without a server, because i dont like the idea of having the database directly connected to the internet. Especially if you release your app in the stores.

Like you already said, create a application server and let that server query data and send it to your phones. You can use JDBC too.

That way other people are not able to break into your database.

It's technically possible thought. android jdbc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM