Question 1
Topic: Connectors and APIs
Skill tested: Select and configure a MySQL connector for secure application access.
A payment service written in Java must access MySQL 8.0 using JDBC. The service runs on multiple hosts, and database credentials must not be embedded in the application package. The database requires TLS, and the application must bind customer-supplied values rather than concatenate them into SQL. The team wants a supported driver that can be configured through standard JDBC properties and used with prepared statements. Which implementation best meets these requirements?
MySQL Connector/J is the JDBC driver intended for Java applications. JDBC connection properties can configure TLS, while a PreparedStatement binds user-supplied values separately from SQL syntax and reduces injection risk. Loading credentials from a protected runtime source avoids packaging secrets with the application. Connector/ODBC is not the natural Java JDBC interface, and source-controlled passwords remain exposed. MySQL Shell is an interactive and scripting client, not a JDBC driver. Direct socket access through Connector/C is not a suitable substitute for the supported Java connector or a secure JDBC connection.