Yes, You can.
Je moet een jar-bibliotheek toevoegen voor mysql. Dan java-code die verbinding maakt met de mysql-server.
import java.sql.DriverManager;
import android.database.SQLException;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.ResultSet;
import com.mysql.jdbc.Statement;
public class SQLConnection {
public static Connection conn = null;
static void setConnection(String user,String pass,String urlServer,String dBase){
try
{
String userName = user;
String password = pass;
String url = "jdbc:mysql://"+urlServer+"/"+dBase;
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
}
catch (Exception e)
{
System.err.println (e.getMessage());
}
finally
{
}
}
public static Connection getConnection(){
return conn;
}
}