List:General Discussion« Previous MessageNext Message »
From:sasha Date:July 11 2000 5:07pm
Subject:Re: Telnet localhost 3306
View as plain text  
Shafeek Ramaiah wrote:
> 
> In MySQL I have decreased the number of Max_connect_errors to 2  (for
> debugging purposes) and to test if mysql is running I telnet to
> localhost on port 3306 the port mysql uses. I get the message:
> 
>         Trying 127.0.0.1...
>         Connected to localhost.
>         Escape character is '^]'.
> 
>         3.22.27-log#iiVQqg/
>         Bad handshakeConnection closed by foreign host.
> 
> Which seems like it works but after doing this 3 or 4 times, I get this
> message:
> 
>         Trying 127.0.0.1...
>         Connected to localhost.
>         Escape character is '^]'.
>         hHost 'localhost' is blocked because of many connection errors.
> block with 'mysqladmin flush-hosts'
>         Connection closed by foreign host.
> 
>   My question is, does telnetting to localhost 3306 always cause an
> error purposely with mysql? Or is this a bug? Or is
>   something wrong with my configuration? Note that there is nothing else
> running that requires MySQL and, I can still
>   get into mysql in a terminal

If you keep pestering wasps in their nest, they will eventually come out and
bite you :-) You should never telnet to port 3306 unless other connection
methods fail and you begin to wonder if there is even a server listening on port
3306. You cannot establish a successful handshake using telnet, unless you can
speak the protocol by memory and use your keybord to generate the entire range
of bytes from 0 to 255 and know which one you are sending, the art that even
Monty himself has not yet mastered :-) But if you do not speak the protocol,
MySQL counts it as an aborted connect - if you do this too much, MySQL assumes
that the host you are comming from has some serious problem, and refuses to talk
to you from then on until you restart the server or do flush hosts.

-- 
Sasha Pachev

+------------------------------------------------------------------+
|      ____  __     _____   _____  ___     http://www.mysql.com    |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sasha Pachev            |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     sasha@stripped         |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Provo, Utah, USA        |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                         |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                        |
|             /*/             \*\ Developers Team                  |
+------------------------------------------------------------------+
Thread
Telnet localhost 3306Shafeek Ramaiah11 Jul
  • Re: Telnet localhost 3306Dana Powers11 Jul
  • Re: Telnet localhost 3306sasha11 Jul
    • Re: Telnet localhost 3306Dave Harms12 Jul
      • Re: Telnet localhost 3306sasha12 Jul