Edit report at https://bugs.php.net/bug.php?id=55752&edit=1
ID: 55752 Updated by: johan...@php.net Reported by: casper at bcx dot nl Summary: Allow mysqli to connect to existing socket connection Status: Open Type: Feature/Change Request Package: MySQLi related Operating System: Any PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: This is an interesting idea. As it is exotic I'm not sure we want it as a core feature and currently it is not trivial to do as plugin either. As PHP 5.4 is in beta and this feature requires some changes in the way the connection is created we can't do it for 5.4. 5.5 the soonest. Maybe we find a good way for a plugin before. Previous Comments: ------------------------------------------------------------------------ [2011-09-21 08:49:16] casper at bcx dot nl Description: ------------ I would like a way to allow mysqli to connect to an existing socket connection. My use case: I have a connection to a remote server over ssh. Using ssh2_tunnel() I can create a socket stream to the mysql server. Currently the only way to do this is use the ssh binary to create a listening port on my local machine and point mysqli to that port. I prefer using ssh2 over a direct connection to mysqli because of security reasons. This way I can keep mysql server to listen on localhost only. Also I would get the added bonus of key-based authentication. As I already use ssh2 extensively for filesystem changes on the remote machine I already have the keys in place to do this. >From what I've understood the mysqlnd extension already uses PHP steams internally, so this shouldn't be impossible. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55752&edit=1