mfaamir

mfaamir

Mysql connect with Android Java?

Dear Sir,

I am a beginner in Android App development and I am currently trying to establish a connection between my Android Studio Java project and my MySQL database. The MySQL database is running perfectly on my computer with XAMPP server, specifically version 5.2.1 (as shown in phpMyAdmin update). The IP address I am using is 192.168.0.101 and the port is set to 3306. I have created a database named “testdb” and a table named “testtb”. The MySQL root user password is null (empty).

However, when I tried to connect using the JDBC connector 5.1.4 in Android Studio Java, I encountered an error. I would greatly appreciate it if you could suggest the best JDBC connector for my MySQL database to establish connectivity with Android Studio Java.

Furthermore, I kindly request you to provide me with the simplest code for establishing connectivity in one screen, specifically for the onclick event.

Thank you for your assistance.

Sincerely,

Most Liked

faust

faust

Hi there, technly speaking you might even be able to do that…
but that’s not recommended for many reasons…

What people usually do is to create a rest webservice that connects to the database and then communicate with it through https.

you can read more about here java - Can we connect remote MySQL database in Android using JDBC? - Stack Overflow

Popular Android topics Top

tauseeqafzal
Question: Android Developer → is there any way to read the .trash directory? → we can copy or save the file before delete ? #android...
New
ciger
I want to get a clone of Instagram APK But with a difference I want to define in this clone that, for example, it is not possible to acc...
New
Joakins
Android studio displayed access is denied during gradle build C:\Program Files\Java\jdk1.8.0_251\native\68d5fa5c4cc2d200863cafc0d521ce42...
New
Shadow
Good afternoon. Brief story: My institution has several nfc tags in building which have to be scanned with specific app built and used in...
New
AndroidDog123
I’m a developer working as a contractor for a company. I’m finding it confusing on how I should answer these questions? Has Google just b...
New
JesperBlom
Hi Hope it is a simple question :slight_smile: I am planning to use a new PC for making my enterprise app. Everything works perfect, b...
New
Briannamari
Old android photo name sequence Help decoding file names Example. I want to see if a file name aligns with a time / date in which the p...
New
Rodion
Hello everyone, I recently started learning Kotlin and downloaded Android Studio, but after writing my first code and trying to run it, I...
New
New
Garrett
I’m stuck trying to understand how to get a variable initialised, and later updated, in kotlin to update in Jetpack Compose and cause a c...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New

Latest in Android

View all threads ❯