MariaDB Tutorial Windows

Membuat Sertifikat SSL untuk MariaDB

Untuk membuat Sertifikat SSL pada MariaDB versi Windows dapat menggunakan OpenSSL.

Baca juga : Install OpenSSL di Windows

Secara default SSL pada MariaDB disabled.

Berikut cara membuat sertifikat SSL untuk MariaDB di Windows

  • Pastikan OpenSSL sudah terinstal, install Open SSL untuk Windows dapat di baca di sini
  • Jalankan Command Prompt dan buat folder baru tempat menyimpan sertifikat SSL.

  • Buat Sertifikat CA
    • openssl genrsa 2048 > ca-key.pem
    • openssl req -new -x509 -nodes -days 365 -key ca-key.pem -out ca.pem

  • Isi data sertifikat CA

  • Buat sertifikat server :
    • openssl req -newkey rsa:2048 -days 365 -nodes -keyout server-key.pem -out server-req.pem
    • openssl rsa -in server-key.pem -out server-key.pem
    • openssl x509 -req -in server-req.pem -days 365 -CA ca.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem

  •  Buat sertifikat client :
    • openssl req -newkey rsa:2048 -days 365 -nodes -keyout client-key.pem -out client-req.pem
    • openssl rsa -in client-key.pem -out client-key.pem
    • openssl x509 -req -in client-req.pem -days 365  -CA ca.pem -CAkey ca-key.pem -set_serial 01 -out client-cert.pem

  • File yang dihasilkan

  • Tambahkan code pada my.ini MariaDB pada bagian [mysqld]

  • Jalankan ulang server dan SSL telah aktif.

Catatan : menggunakan Common Name yang sama pada sertifikat CA, server, dan client akan menyebabkan ERROR 2026 (HY000). Gunakan Common Name yang berbeda.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.