Re: Connecting to a Windows database from Z/OS
Posted by: Filipe Silva
Date: February 03, 2022 04:54AM

Both applications, Windows and Z/OS, are connecting to the same MySQL Server instance? If so, in what system is the server Running?

Have you tried a basic test using just Connector/J? Something like:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;

public class Test {

    public static void main(String[] args) throws Exception {
        final String url = "jdbc:mysql://[USER]:[PASSWORD]@[HOST]:[PORT]/[DATABASE]?sslMode=disabled&allowPublicKeyRetrieval=true";

        try (Connection conn = DriverManager.getConnection(url); ResultSet rs = conn.createStatement().executeQuery("SELECT CURRENT_USER()")) {
            while (rs.next()) {
                System.out.println(rs.getString(1));
            }
        }
    }
}

Please try this and share your results.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.