Encrypting connections with SSL
When we are connecting to a MariaDB database running on our local workstation, there's really no need to think about whether or not the traffic between the mysql
client and our database is secure. The traffic is all local and is confined to a single machine.
If, on the other hand, our client is running on one server and our database is on another server in some other part of the world, or even in the same datacenter, we should think about encrypting the traffic between the two.
Getting ready
This is a Linux-only recipe. To prepare for this recipe, we will need a set of SSL certificates. Certificates signed by a recognized and trusted certificate authority are preferred, but we can also use certificates we create ourselves. To create a set of self-signed certificates, we need to perform the following steps:
Create a temporary directory and navigate to it by using the following statement:
mkdir -v ssl-tmp;cd ssl-tmp
Create a certificate authority key file using...