mysql_ssl_rsa_setup สร้าง SSL Certificate, Key Files และ RSA Key-Pair Files สำหรับ Secure Connections (SSL) และ Secure Password Exchange (RSA over Unencrypted) หากขาดหายไป
การเรียกใช้
shell> mysql_ssl_rsa_setup [options]
ตัวเลือกสำคัญ: --datadir (ระบุที่สร้างไฟล์), --verbose (แสดงคำสั่ง openssl)
การทำงาน
- ตรวจสอบ openssl binary ใน PATH
- หา SSL/RSA Files เริ่มต้นใน Data Directory (
--datadirหรือ Compiled-in) - ถ้ามีไฟล์ SSL อยู่แล้ว -> ไม่สร้างใหม่
- ถ้าไม่มี -> เรียก openssl สร้างไฟล์
ไฟล์ SSL ที่สร้าง
| ไฟล์ | คำอธิบาย |
|---|---|
| ca.pem | Self-signed CA Certificate |
| ca-key.pem | CA Private Key |
| server-cert.pem | Server Certificate |
| server-key.pem | Server Private Key |
| client-cert.pem | Client Certificate |
| client-key.pem | Client Private Key |
ไฟล์ RSA ที่สร้าง
| ไฟล์ | คำอธิบาย |
|---|---|
| private_key.pem | Private Key ของ Key Pair |
| public_key.pem | Public Key ของ Key Pair |
ไฟล์เหล่านี้ใช้สำหรับ Secure Client Connections ด้วย SSL