mysql-binlog-connector-java
mysql-binlog-connector-java copied to clipboard
SSL with client certificate failed
when I try to connect to mysql 5.7+ with ssl and client certificate , it failed with exception: com.github.shyiko.mysql.binlog.network.AuthenticationException: Access denied for user 'test_cert'@'10.100.124.33' (using password: YES) at com.github.shyiko.mysql.binlog.BinaryLogClient.authenticate(BinaryLogClient.java:728) at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:515). However, it works with mysql driver.
The user I created is as below:
CREATE USER test_cert@'%' IDENTIFIED BY '*******' REQUIRE X509;
GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON . TO test_cert@'%';
and the certificate setting is like : System.setProperty("javax.net.ssl.keyStore","/desktop/TLS/keystore"); System.setProperty("javax.net.ssl.keyStorePassword","mypassword");
the reference is : https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html https://dev.mysql.com/doc/refman/8.0/en/create-user.html#create-user-tls
@qingw1983 May I ask if this problem was resolved later?