Access the database using certificates

  • Respuestas:0
  • AbiertoSin chinchetaSin solución
  • Posts del Foro: 1

13 mar. 2020 11:37:10 vía Web

Class.forName("org.mariadb.jdbc.Driver").newInstance();

String url = "jdbc:mariadb://ipservidor/bbdd";
Properties props = new Properties();
props.setProperty("user","nombreusuario");
props.setProperty("password","password");
props.setProperty("ssl","true");
props.setProperty("sslmode","verify-full");
props.setProperty("sslrootcert",mContext.getAssets().open("certs/ca-cert.pem").toString());
props.setProperty("sslkey",mContext.getAssets().open("certs/client-key.pem").toString());
props.setProperty("sslcert",mContext.getAssets().open("certs/client-cert.pem").toString());

cnn = DriverManager.getConnection(url,props);

ERROR = Access denied for user

Contesta el/la primero/a
Artículos recomendados