I was working on testing Database Password feature of OCI. It allows you to use IAM username and this new set credentials to log on to the oracle database (external authentication). While working on this, I tried to log on the Autonomous database using ADMIN user from SQL Developer and got IO Error: Mismatch with the server cert DN.
I was using SQL Developer version 19.2.1.
Here is the error.
After researching around this error, the solution that resolved my issue was very simple. Upgrade SQL Developer!!! I downloaded the latest version 22.2.1 and tested the connection successfully.
If you come across this or similar cert related error and upgrading SQL Developer to latest version does not help, take a look at the Oracle ALERT: Action Required for Autonomous Databases that Use mTLS Authentication (Doc ID 2911553.1).