| Re: MySql client on Linux - disabling sockets -
06-04-2007, 07:58 AM
On May 27, 2:00 am, "Stephan Carydakis" <scaryda...@nospam.gmail.com>
wrote:
> "Lew" <l...@nospam.lewscanon.com> wrote in message
>
> news:EMAIL REMOVED. ..
>
>
>
> > Stephan Carydakis wrote:
> > > Yes. But the problem is not with SSH. Apparently, MySql automatically
> uses
> > > sockets on Linux when the client connects using "localhost". This takes
> port
> > > forwarding out of the equation. So how do I tell th MySql client to not
> uses
> > > sockets?
>
> > I am having trouble understanding what you just said. Port forwarding is
> all
> > about sockets. The forwarded 3306 port is forwarded so that socket
> connections
> > on the client machine become socket connections on the host machine. That
> is
> > hardly "out of the equation". It /is/ the equation.
>
> Unix sockets have no concept of ports. When using "localhost" to connect to
> a MySql server on Linux. it automatically uses sockets.
Yes, it's a special case; therefore you cannot avoid changing the
connection parameters. The fact that these are duplicated in 45 places
is very poor coding practice, and the most humane solution is to
isolate them in a single function. Do it now and reap the rewards
later. :-)
> You can not use
> sockets to connect to a remote server. You can only use sockets to connect
> to a local MySql server. See my predicament?
>
> > -- Lew |