Connect to a MySQL server over SSH in PHP - SSH TUNNEL

Job ID: 32133093

Budget: $2 – $8 USD

I have my database on a remote Linux machine, and I want to connect using SSH and PHP functions (I am currently using the ssh2 library for that). I tried using mysql_connect, but I got this error: Warning: mysqli::__construct() expects parameter 6 to be string

hope someone can fix this.
Related categories: PHP System Admin Linux Apache MySQL