Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MySQL

mysql_ssl_rsa_setup - สร้างไฟล์ SSL/RSA ใน MySQL

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)

การทำงาน

  1. ตรวจสอบ openssl binary ใน PATH
  2. หา SSL/RSA Files เริ่มต้นใน Data Directory (--datadir หรือ Compiled-in)
  3. ถ้ามีไฟล์ SSL อยู่แล้ว -> ไม่สร้างใหม่
  4. ถ้าไม่มี -> เรียก openssl สร้างไฟล์

ไฟล์ SSL ที่สร้าง

ไฟล์คำอธิบาย
ca.pemSelf-signed CA Certificate
ca-key.pemCA Private Key
server-cert.pemServer Certificate
server-key.pemServer Private Key
client-cert.pemClient Certificate
client-key.pemClient Private Key

ไฟล์ RSA ที่สร้าง

ไฟล์คำอธิบาย
private_key.pemPrivate Key ของ Key Pair
public_key.pemPublic Key ของ Key Pair

ไฟล์เหล่านี้ใช้สำหรับ Secure Client Connections ด้วย SSL