B4J Question JRDC2 not able to connect to MySql, wrong port 3308

marcick

Well-Known Member
Licensed User
Longtime User
It's some years I'm working with JRDC2, I have setup about 10 server almost identical without troubles, I have precise pdf instruction on how to do step by step, but this time There was no way to make it working.
The only difference in this new installation are:

1) WAMP version from 3.1.7 to 3.2.0
2) MySQL version fron 5.7.24 to 5.7.28

Doing a simple test with JRDC2 demo, I was not able to establish a connection with the db.
After a couple of days pushing the head on the wall, I discovered a small difference between this installation and all the other running: MySQL was configured to use port 3308 instead of the usual 3306.
Changing this port to 3306 fixed everything (I found it in WAMP-MySQL settings)

Question is: does JRDC2 or MySQL-Connector always expect to work with MySQL port 3306 ?
Or is it a setting hidden somewhere ?
 

DonManfred

Expert
Licensed User
Longtime User
does JRDC2 or MySQL-Connector always expect to work with MySQL port 3306 ?
no but this is the default port.

You can specify the port in the connectionstring i guess (never used JRDC2...). This only works if you are using a different port in mysql config. You need to adapt the connectionstring to use the port you want and used in mysql config.

Also make sure to adapt your firewall settings if you use another port. The port must be open for incoming connections. No matter which port you use.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…