Android Question Remote mysql connect timeout.

Endomi

Member
Licensed User
Longtime User
Hello
I am trying to interact with a remote-mysql database.
I call the following procedure, when clicking a button:

B4X:
Sub CreateTable
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "create_table"
'cmd.Parameters = Array As Object("cat 1")
reqManager.ExecuteCommand(cmd,0)
End Sub

But after +-30 seconds I get the following error,when the code enters JobDone:

DBRequest org.apache.http.conn.ConnectTimeoutException: Connect to /192.168.0.100:17178 timed out

I have tried connecting to my online db using C# and it works, and when I run http://127.0.0.1:17178/?method=test then it says connection successful, but don't know what causing the above connect timeout.
If it's important, I connect my phone to the internet via wifi.
Thanks for assistance.
 

Endomi

Member
Licensed User
Longtime User
Has anyone successfully connected to a remote database that can assist me with the above?
I'm willing to show my code....anything as I would like to start interacting with my online db.
Thx
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
I've set it up in the inbound/outbound rules.
Also I don't have antivirus...damn I should get it.
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
Interesting.
After I ran the .bat file and opened the test method in the desktop browser I get the normal
RemoteServer is running (Mon Sep 16 20:19:49 CAT 2013)
Connection successful.


but when I do it from my cellphone it takes a long time(maybe as long as it takes when I run a query through my above mentioned code) until it gives the error "The server timed out".
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
Next time I refreshed the test method on the phone I got the error "Could not connect to remote server".
But it works through the desktop.
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
What do you mean by wrong IP address? I actually don't understand that.
I also get the same issue whether I connect to the internet via wifi/mobile internet, busy trying to rule out all possible causes to narrow it down.
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
Does IPv4/6 matter in anyway when connecting to remote server? Reason I ask is bcos my router says IPv6 does not have network access, but IPv4 does have.
 
Upvote 0

Endomi

Member
Licensed User
Longtime User
Thanks for the reply, I have stopped the WiFi, and the mobile internet connection of the device. And I connect it to the pc via usb(this I've always done).
The error I get now is:
Error: Job Name: DBRequest org.apache.http.conn.HttpHostConnectionException: Connection to http://192.168.0.100:17178 refused

In the meantime I'll re-do the remote connect tutorial on another pc.
 
Upvote 0
Top