You are here: Re: PHP SSH and mysql connection « PHP Programming Language « IT news, forums, messages
Re: PHP SSH and mysql connection

Posted by Alvaro G Vicario on 07/01/05 11:47

*** Hendrik Maeder wrote/escribió (Wed, 29 Jun 2005 11:14:35 +0200):
> How can I force that socket onto 'mysql_connect'? I mean, what I have is:
> $tunnel = ssh2_tunnel($connection, '10.0.0.101', 12345);
>
> But $tunnel is a PHP resource, and not in the format ':/path/to/socket'
> that mysql_connect expects...


According to manual mysql_connect() does not expect necessarily a socket
file (actually, ":/path/to/socket" support was added at a later time).

I haven't tried it myself with PHP so it's just a guess but... Once the
tunnel if open, can't you simply connect through it using host+port as
usual? The idea of a tunnel is that applications don't have to know about
it.

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация