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

Where Next?

Popular Android topics Top

CristianM92
Hi, I’m working on an app who make the conversion between decimal degrees and degrees minutes seconds. I have to make an “Export” button ...
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
Nevio
Hi, I made an android app and created a signature with keytool. I then bundled the signature in the apk. So, I was wondering if, wanting...
New
mfaamir
Dear Sir, I am a beginner in Android App development and I am currently trying to establish a connection between my Android Studio Java ...
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
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
Ujjwala
I’m developing an Android application in which I need to add functionality to automatically read a CSV file from a file manager, parse it...
New
skysnap
Helo, I’m using doubleviewpager in my project: Is there something similar that works with android x?
New
Devraj5032
I’m using TensorFlow Lite (TFLite) with React Native Expo. When I test the app using the Expo Go app, everything works fine. However, whe...
New
auroralane7754
Hey developers :waving_hand: I’m currently experimenting with various mobile VPN apps to simulate different network conditions for API t...
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
AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
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
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
hilfordjames
There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New