Thank you very much for your answers.
We don't want private networks like the digital ocean or similar, because we want to put our data on separate data centers.
We already tried Stunnel.
On Stunnel we only need to give the TB the IP 127.0.0.1:3306, and make all configurations (IP, port and SSL) on Stunnel, it works but is too slow.
Now we are looking for a better solution.
We also made an SSL tunnel between server #1 and server #2 with MariaDB_client
Server #1 with:
-Httpd
-MariaDB_client:3306 with SSL
Server #2 with:
-MariaDB_server:3306 with SSL
Right now, the TB on server #1, goes directly to MariaDB_Server on server #2.
And mannualy we can go from MariaDB_client on server #1 to MariaDB_server on server #2 ussing the following command:
mysql -u tb -h XXX.XXX.XXX.XXX --port=3306 -p databasetest
The goal is telling to TB to go to MariaDB_client on server #1 and then to go to MariaDB_server on server #2.
Our question is, how to tell TB to use the MariaDB_client?
Any help will be appreciated.