localhost vs domain for connection string
localhost vs domain for connection string
am 23.11.2010 11:11:16 von Brent Clark
Hiya
Is there a difference if someone had to make the connection string the a
domain (hosts file entry makes the machine look at its ip) as opposed to
just using localhost.
If so would a performance hit be incurred?
I have this client that has used the domain and in netstat im seeing
all this
tcp 0 0 own.ex.ip:50340 own.ex.ip:3306
ESTABLISHED 30324/apache2
tcp 0 0 own.ex.ip:50287 own.ex.ip:3306
ESTABLISHED 30309/apache2
tcp 0 0 own.ex.ip:3306 own.ex.ip:50287
ESTABLISHED 29234/mysqld
tcp 0 0 own.ex.ip:50357 own.ex.ip:3306
ESTABLISHED 31714/apache2
tcp 0 0 own.ex.ip:3306 own.ex.ip:50335
ESTABLISHED 29234/mysqld
But I have another client that is using localhost and netstat is quiet
as a mouse.
This actually never dawned on me. Hence the reason im asking
But the real reason is that the first clients machine is under heavy
load and we are trying to see what can be improved.
Kind Regards
Brent Clark
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: localhost vs domain for connection string
am 23.11.2010 12:19:15 von Johan De Meersman
--00221532cd100411190495b68b98
Content-Type: text/plain; charset=ISO-8859-1
IIRC, "localhost" is seen by the client as a magic word to mean "use the
UNIX socket, not 127.0.0.1".
So, yes, that would make the connection not show up in netstat :-)
On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark wrote:
> Hiya
>
> Is there a difference if someone had to make the connection string the a
> domain (hosts file entry makes the machine look at its ip) as opposed to
> just using localhost.
> If so would a performance hit be incurred?
>
> I have this client that has used the domain and in netstat im seeing all
> this
>
> tcp 0 0 own.ex.ip:50340 own.ex.ip:3306 ESTABLISHED
> 30324/apache2
> tcp 0 0 own.ex.ip:50287 own.ex.ip:3306 ESTABLISHED
> 30309/apache2
> tcp 0 0 own.ex.ip:3306 own.ex.ip:50287 ESTABLISHED
> 29234/mysqld
> tcp 0 0 own.ex.ip:50357 own.ex.ip:3306 ESTABLISHED
> 31714/apache2
> tcp 0 0 own.ex.ip:3306 own.ex.ip:50335 ESTABLISHED
> 29234/mysqld
>
> But I have another client that is using localhost and netstat is quiet as a
> mouse.
>
> This actually never dawned on me. Hence the reason im asking
> But the real reason is that the first clients machine is under heavy load
> and we are trying to see what can be improved.
>
> Kind Regards
> Brent Clark
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--00221532cd100411190495b68b98--
Re: localhost vs domain for connection string
am 23.11.2010 18:33:22 von Jan Steinman
> From: Brent Clark
>=20
> Is there a difference if someone had to make the connection string the =
a domain (hosts file entry makes the machine look at its ip) as opposed =
to just using localhost.
> If so would a performance hit be incurred?
Using 'localhost' will always be faster, although perhaps imperceptibly =
so.
----------------
I look into the future because that=92s where I am going to spend the =
rest of my life. -- George Burns
:::: Jan Steinman, EcoReality Co-op ::::
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: localhost vs domain for connection string
am 23.11.2010 19:55:44 von Jerry Schwartz
>-----Original Message-----
>From: vegivamp@gmail.com [mailto:vegivamp@gmail.com] On Behalf Of Johan De
>Meersman
>Sent: Tuesday, November 23, 2010 6:19 AM
>To: Brent Clark
>Cc: mysql mailing list
>Subject: Re: localhost vs domain for connection string
>
>IIRC, "localhost" is seen by the client as a magic word to mean "use the
>UNIX socket, not 127.0.0.1".
>
[JS] IF it is enabled in my.cnf.
>So, yes, that would make the connection not show up in netstat :-)
>
>On Tue, Nov 23, 2010 at 11:11 AM, Brent Clark
>wrote:
>
>> Hiya
>>
>> Is there a difference if someone had to make the connection string the a
>> domain (hosts file entry makes the machine look at its ip) as opposed to
>> just using localhost.
>> If so would a performance hit be incurred?
>>
>> I have this client that has used the domain and in netstat im seeing all
>> this
>>
>> tcp 0 0 own.ex.ip:50340 own.ex.ip:3306 ESTABLISHED
>> 30324/apache2
>> tcp 0 0 own.ex.ip:50287 own.ex.ip:3306 ESTABLISHED
>> 30309/apache2
>> tcp 0 0 own.ex.ip:3306 own.ex.ip:50287 ESTABLISHED
>> 29234/mysqld
>> tcp 0 0 own.ex.ip:50357 own.ex.ip:3306 ESTABLISHED
>> 31714/apache2
>> tcp 0 0 own.ex.ip:3306 own.ex.ip:50335 ESTABLISHED
>> 29234/mysqld
>>
>> But I have another client that is using localhost and netstat is quiet as a
>> mouse.
>>
>> This actually never dawned on me. Hence the reason im asking
>> But the real reason is that the first clients machine is under heavy load
>> and we are trying to see what can be improved.
>>
>> Kind Regards
>> Brent Clark
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>>
>>
>
>
>--
>Bier met grenadyn
>Is als mosterd by den wyn
>Sy die't drinkt, is eene kwezel
>Hy die't drinkt, is ras een ezel
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: localhost vs domain for connection string
am 24.11.2010 08:39:13 von Johan De Meersman
--0016364d265bf42e370495c79524
Content-Type: text/plain; charset=ISO-8859-1
On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz wrote:
> >IIRC, "localhost" is seen by the client as a magic word to mean "use the
> >UNIX socket, not 127.0.0.1".
> >
> [JS] IF it is enabled in my.cnf.
>
Hmm, didn't know that bit. What's the option called ?
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--0016364d265bf42e370495c79524--
RE: localhost vs domain for connection string
am 24.11.2010 16:44:52 von Jerry Schwartz
>-----Original Message-----
>From: vegivamp@gmail.com [mailto:vegivamp@gmail.com] On Behalf Of Johan De
>Meersman
>Sent: Wednesday, November 24, 2010 2:39 AM
>To: Jerry Schwartz
>Cc: Brent Clark; mysql mailing list
>Subject: Re: localhost vs domain for connection string
>
>On Tue, Nov 23, 2010 at 7:55 PM, Jerry Schwartz wrote:
>
>> >IIRC, "localhost" is seen by the client as a magic word to mean "use the
>> >UNIX socket, not 127.0.0.1".
>> >
>> [JS] IF it is enabled in my.cnf.
>>
>Hmm, didn't know that bit. What's the option called ?
>
[JS] This might or might not be enabled by default. I'm running on Windows,
and I seem to remember having to change it.
# SERVER SECTION
# ------------------------------------------------------------ ----------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
# Enable named pipe, bypassing the network stack
enable-named-pipe
=========================
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp
Web site: www.the-infoshop.com
>--
>Bier met grenadyn
>Is als mosterd by den wyn
>Sy die't drinkt, is eene kwezel
>Hy die't drinkt, is ras een ezel
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: localhost vs domain for connection string
am 25.11.2010 09:28:50 von Johan De Meersman
--00221534d5273b226d0495dc6545
Content-Type: text/plain; charset=ISO-8859-1
On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz wrote:
> [JS] This might or might not be enabled by default. I'm running on Windows,
> and I seem to remember having to change it.
>
> # Enable named pipe, bypassing the network stack
> enable-named-pipe
>
Windows' named pipes are not the same as unix sockets, although the general
idea is similar. I'm not sure, but I think the Unix socket file is always
created.
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--00221534d5273b226d0495dc6545--
RE: localhost vs domain for connection string
am 29.11.2010 17:16:03 von Jerry Schwartz
>-----Original Message-----
>From: vegivamp@gmail.com [mailto:vegivamp@gmail.com] On Behalf Of Johan De
>Meersman
>Sent: Thursday, November 25, 2010 3:29 AM
>To: Jerry Schwartz
>Cc: Brent Clark; mysql mailing list
>Subject: Re: localhost vs domain for connection string
>
>On Wed, Nov 24, 2010 at 4:44 PM, Jerry Schwartz wrote:
>
>> [JS] This might or might not be enabled by default. I'm running on Windows,
>> and I seem to remember having to change it.
>>
>> # Enable named pipe, bypassing the network stack
>> enable-named-pipe
>>
>
>Windows' named pipes are not the same as unix sockets, although the general
>idea is similar. I'm not sure, but I think the Unix socket file is always
>created.
>
[JS] I don't remember either. I also don't remember if the original question
was about *nix or Windows.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
E-mail: jerry@gii.co.jp
Web site: www.the-infoshop.com
>--
>Bier met grenadyn
>Is als mosterd by den wyn
>Sy die't drinkt, is eene kwezel
>Hy die't drinkt, is ras een ezel
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org