Added
A Java service connects to MySQL 8.0 from containers that are frequently replaced. The team requires TLS, wants to avoid embedding database passwords in source or container images, and must use a supported Oracle connector. The service currently creates one physical connection for every web request, causing connection spikes during traffic bursts. Which change best meets the security and connection-management requirements with the least application-level connection overhead?
Connector/J is Oracle's JDBC driver for Java, and a connection pool avoids creating a physical database connection for every request. Loading credentials from a protected runtime secret avoids baking them into images or source, while TLS protects traffic in transit. MySQL Shell is an interactive administration and development tool, not the Java application's JDBC driver. Connector/ODBC is not the appropriate Java API, and a global connection does not provide sound pooled connection management. Pooling does not encrypt network traffic, so disabling TLS leaves credentials and data exposed in transit.