i have deployed mariadb on Azure with ssl enabled.
The server name looks like : somename.mariadb.database.azure.com
i installed mariadb client on my jumpserver. I did nslookup somename.mariadb.database.azure.com and which gives 10.0.4.68.
However when i do :
1. mysql -h somename.mariadb.database.azure.com -u"benighil@somename" -p"I******4" --ssl-verify-server-cert --ssl-ca /home/rootvm/workdir/BaltimoreCyberTrustRoot.crt.pem THEN IT WORKS FINE
2. mysql -h 10.0.4.68 -u"benighil@somename" -p"I******4" --ssl-verify-server-cert --ssl-ca /home/rootvm/workdir/BaltimoreCyberTrustRoot.crt.pem IT DOES NOT WORK
Notice: in 2.
- i just replaced the DNS by its IP 
- the error i got is : 
ERROR 2026 (HY000): SSL connection error: The certificate is NOT trusted. The name in the certificate does not match the expected.
I would like to know why ?
 
    