Android Question Slow to connect directly to MySQL with mobile data, not wifi.

Dwnr80

New Member
Hi. I'm trying to make a small app just for me that connects directly to our MySQL-database. I've tried multiple examples and libraries but with the same result every time. Now I'm beginning to think it might be my phone or if I'm missing some of them manifest-rows or whatever (yea, I'm kinda new to B4A :)). Right now I'm testing mysql-connector-java-5.1.47-bin.jar (tried some different versions, also MariaDBConnector) and jtds-1.3.1.jar.

This line:
MYSQL.Initialize:
MYSQL.Initialize(Me,"MYSQL", "com.mysql.jdbc.Driver", "jdbc:mysql://thedatabase.com:3306/mydatabase?useSSL=false",  MyUsername, MyPassword)

When phone is connected to wifi it takes a second, when using mobile data it takes 25-35 seconds. Measuring the mobile data speed it's ~6mbit/s up and down with a response time of ~30ms.
After it is connected I can run queries with no problem at full speed, it's just this MYSQL.Initialize it gets stuck on.


Anyone got any ideas what I'm doing wrong and why it's so slow? Thank you.
 
Top