private static Connection establishDatabaseConnection(String url, String user, String password) throws Exception {
        Connection conn;
        try {
            Class.forName(MYSQL_DRIVER_CLASS);
            conn = DriverManager.getConnection(url, user, password);
        } catch (Exception e) {
            String errorMsg = "Failed to get MySQL connection, please check MySQL JDBC URL, username, or password!";
            LOGGER.error(errorMsg, e);
            throw new Exception(errorMsg + " Other error message: " + e.getMessage());
        }
        LOGGER.info("get MySQL connection success for url={}", url);
        return conn;
    }
Establishes a database connection using the provided URL, username, and password.

@param url      The JDBC URL
@param user     The username
@param password The user's password
@return A {@link Connection} object representing the database connection
@throws Exception If an error occurs while obtaining the connection
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/mysql/MySQLJdbcUtils.java