How can I connect to a MySQL database that requires an SSH tunnel using PHP and the Zend Framework?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Is there any way to set this up to create a persistent connection in either the apache2 config or through Zend so it connects when needed from the server and remains open for a period of time in case subsequent calls come in?
Just start up SSH tunnel and use the local port as your MySQL port.
For example, you start tunnel as this,
And you can connect to MySQL like this,
For zend_db, you do this,