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