I am trying to connect from Java to a DSN using MariaDB,
If I not use the DSN it works
Class.forName("org.mariadb.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:mariadb://< host >:<port>/< database >", < user >,< password >);
But I would like that mariadb uses the host and port specified in the odbc.ini, but I can’t make it work.
I have tried many ways but it did not work, I could not find anything on internet about it.
eg:
Connection conn = DriverManager.getConnection("jdbc:mariadb:< DSN_NAME >", < user >,< password >);
The DSN is correctly configured in the odbc.ini, it works with isql
Can anyone help me?,
Thank you very much.