This guide has been updated for elementaryOS v5.0+.
sudo apt-get update
sudo apt-get -y install software-properties-common
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost