How to connect to MySQL with SSL certificates

2 ビュー (過去 30 日間)
Larry Qian
Larry Qian 2018 年 10 月 17 日
回答済み: Piyush Kumar 2024 年 11 月 20 日 2:25
Hi, I'm trying to connect to a MySQL database using the JDBC driver. The MySQL database has SSL authentication enabled and requires 3 keys: client-cert.pem, client-key.pem and client-ca.pem. How do I include these 3 files in my connection?

回答 (1 件)

Piyush Kumar
Piyush Kumar 2024 年 11 月 20 日 2:25
Hi,
To connect to a MySQL database with SSL certificates, the method depends on the tool or language you're using:
  • Command Line: You can connect using the following options:
mysql --ssl-ca=ca.pem
--ssl-cert=client-cert.pem
--ssl-key=client-key.pem
  • Java: If you're using Java, you can include the SSL certificate files in the connection URL. Check this link.
  • MATLAB: If you are using MATLAB, please check this link.
I also found MATLAB documentation mentioning how to specify the database connection URL, but the SSL option with MySQL is not given.

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by