Is JDBC driver auto downloaded?

While upgrading our JDBC connector, some thing interesting surfaced and I'd like to confirm my observations. I'm using TeamCity-server docker image TeamCity Enterprise 2023.05.4 (build 129421).

1. Delete the jar in {datadir}/lib/jdbc/mysql-connector-java-8.0.30.jar and then do a server restart. The connector jar is then downloaded automatically during start up, as the log shows 

[2023-10-12 03:11:24,883]   INFO -  jetbrains.buildServer.STARTUP - Downloading JDBC driver metadata from <>...
[2023-10-12 03:11:26,744]   INFO -  jetbrains.buildServer.STARTUP - Downloading mysql JDBC driver...
[2023-10-12 03:11:27,055]   INFO -  jetbrains.buildServer.STARTUP - Successfully downloaded mysql JDBC driver.
[2023-10-12 03:11:27,056]   INFO -  jetbrains.buildServer.STARTUP - JDBC loader: loading JDBC drivers (for the first time)
[2023-10-12 03:11:27,755]   INFO -  jetbrains.buildServer.STARTUP - JDBC driver version: 8.0 (MySQL Connector/J)

Is the auto download expected? Is there any doc or source code I can refer to?


2. Delete the old jar, and put a new one mysql-connector-j-8.1.0.jar, and restart the server. This time the new connector is picked up and the log shows 

[2023-10-12 00:38:04,511]   INFO -  jetbrains.buildServer.STARTUP - JDBC driver version: 8.1 (MySQL Connector/J)

Is this the correct way to upgrade the connector version?


Yes, this is expected behavior. TeamCity requires a connection to the database to work, so the alternative would be to force users to visit a page and install it manually. It will only automatically download it in case it doesn't find a valid connector already in the jdbc folder, so most installations can simply ignore this check

Are you looking for anything in particular? I'm not aware that this behavior is modifiable, but if you are looking for some functionality or some possibility to adapt the behavior, we might be able to. Alternatively, you can send that question or request to improve it to our issue tracker to be notified automatically of any status update on it.

Thanks for confirming.

My goal was to upgrade the connnector jar, with the concern that the auto download would overwrite my changes, since it was not a documented process.

We did a connector jar upgrade last Friday, with the process stated in 2), and it seems to work so far.


Please sign in to leave a comment.