B4J Question jSQL, jRDC2 and Remote MySQL databases...

Robert Maguire

Member
Licensed User
Longtime User
Hi All,

Please note... I have read all (or as many as I could find) threads regarding jRDC2 but I'm still somewhat confused about what I should be using. :confused:

I'm playing with an ABMaterial app, which is working beautifully when I'm running it using USBWebserver with a MySQL database, i.e. localhost, on my dev PC.

I'm now getting ready to deploy the app to my webserver and thought I would try testing out the connection to the real database located on the webserver. When I attempt to connect to the remote database I get:

java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

There are many threads about this in the B4X forums as well as other forums for java, etc.... but I'm struggling to understand what I need to do. So, when in doubt, ask simple questions....

Can somebody please advise:
  • Do I need to use jRDC2 when connecting to a MySQL database on a different server? or alternatively
  • If I do not need to use jRDC2 and can simply use jSQL, why would I be getting the 'connection timeout' error?
  • If I deployed my ABMaterial app to the same server as the remote MySQL database then can I stick with jSQL using 'localhost'?
Please Note: I have tested connecting to the remote MySQL database using MySQL Workbench on the PC that I am developing the ABMaterial app on and it connects fine, although I don't know what drivers the MySQL Workbench application uses.

Thanks in advance.
 

Robert Maguire

Member
Licensed User
Longtime User
I'm embarrassed to say that after doing a quick test with a very cut down B4J project I discovered that I had entered my database credentials incorrectly and can report that I can successfully connect to the remote database using the jSQL library only. Also worked (as you would expect) in my ABMaterial app after I corrected the credentials.

Apologies if wasted anybody's time.
 
Upvote 0
Top