Software Archive
Read-only legacy content
17060 Discusiones

How to connect MySQL database in Java ?

Find_N_
Principiante
2.233 Vistas

I am coding a module in java that need a database connection with MySQL. I heard about DriverManager but I think it is pretty old method for database connection. Is there any newer and efficient way of doing the same. This Java questions and answers forum comprises of large number of tech and coding expert, So I expect quick and satisfactory solution or full set of instruction/ code require for this.

0 kudos
3 Respuestas
Swati_S_Intel1
Empleados
2.233 Vistas

Are you trying to develop a mobile application? This forum is for Intel XDK -for developing mobile apps - mainly front end. For connecting to back end you typically make AJAX call from the app that gets served by your server script (PHP or other which can connect to MySQL).

Find_N_
Principiante
2.233 Vistas

Thanks for your reply. I only need to connect MySql database in Java not in PHP..

Kindly, can you elaborate ?

Thanks in Advance

PaulF_IntelCorp
Empleados
2.233 Vistas

Hello Find -- this forum does not cover the question you are trying to resolve. This forum is directed at the Intel XDK, which is a tool for building Cordova hybrid apps. Cordova hybrid apps cannot use Java, they are built from HTML, CSS and JavaScript. If you want to connect to a database from within a Cordova app you need to build a RESTful API on your server and then use AJAX calls from your application to request and send data to that server. Cordova apps cannot run Java code.

Responder