PDO connect to external database via tunnel

I'd like to ask you, how to connect to an external database via tunnel using PDO?

My Database class is:

<?php 

    class Database {

        //Server Params
        private $server_addres = 'xx.xx.xx';
        private $port = '222';
        private $user = 'myuser';
        private $pass = 'mypass';

        //DB Params 
        private $host = '127.0.0.1';
        private $db_name = 'mydbname';
        private $username = 'mydbuser';
        private $password = 'mydbpassowrd';
        private $conn;

        //DB Connect
        public function connect() {
            $this->conn = null;

            try {

                //???
                shell_exec();

                $this->conn =  new PDO('mysql:host='.$this->host.';dbname='.$this->db_name, $this->username, $this->passowrd);
                $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            } catch( PDOException $e ) {
                echo 'Connection Error: ' . $e->getMessage();
            } 

            return $this->conn;
        }
    }

Should I use shell_exec() function, if yes how?

Thank you for your help!