If you are using a MySQL server that does not live on the same server you should strongly consider accessing your database over SSL to prevent any snooping of not only your data but also your database credentials.
MariaDB
Here is a great article on how to enable SSL in a Maria DB.
https://www.cyberciti.biz/faq/how-to-setup-mariadb-ssl-and-secure-connections-from-clients/
Client - AAGM
To enable your connection over SSL you will need a copy of the SSL cert your database server is expecting.
...