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

AndroidMan
I’ve tried signing up for Airnow as I used to do very well when they were Airpush, but i haven’t used them in years. I went through the s...
New
Joakins
Android studio displayed access is denied during gradle build C:\Program Files\Java\jdk1.8.0_251\native\68d5fa5c4cc2d200863cafc0d521ce42...
New
Apoorv
I have made my version of browser on android platform.I have used chromium as base. I have build it successfully & but the logo or i...
New
DAZ
Is it possible to develop an application that will generate NFC pulses even when the screen is off?
New
cve60069
Hello I am starting the tearning curve to writing an app for my galaxy phone. Me and my friens play a lot of “Texas Hold-Em” and, for t...
New
tunelabguy
I have an expensive app ($160) in the Play Store that I would like to update. I would like to do a beta test of the update with potentia...
New
freerefills
I have an android app whereby notifications will fire and immediately leave the tray. This doesn’t always happen, it’s unpredictable they...
New
codergrid
I’m new to Android Studio, and curious about how long you’ve been using your Android Studio IDE. I read on Wikipedia that this year, Andr...
New
hasan10242048
There is an Android app. I just want to create two GRAPHS with CPU Runtime and Battery Consumption. It is as simple as this. I tried w...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New