[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mysql command waiting endlessly (lenny)



On Wed, 17 Sep 2014, berenger.morel@neutralite.org wrote:
> Le 16.09.2014 19:46, Don Armstrong a écrit :
> >Most likely, you've created a configuration where the machine in
> >question is unable to access 3306.
> 
> I do not think so, since the isql command (which uses odbc driver)
> works, and is configured to use port 3306.

In the future, these details would be helpful.
 
> >You can also telnet 10.6.0.3 3306; (or use nc) from the afflicted
> >machine to see if it even connects to mysql at all.
> 
> I already did some nc on the target: nc 10.6.0.3 -p 3306. It was how I
> guessed the mysql server's version.

If you are able to successfully use nc from the target machine, and you
can talk to the server, and get a response from it, then it's unlikely
to be the network. [You were able to run nc and get an echo back from
the server, right? You should see something like this:

$ echo asdf|nc localhost 3306|hexdump -C
00000000  54 00 00 00 0a 35 2e 35  2e 33 38 2d 30 2b 77 68  |T....5.5.38-0+wh|
00000010  65 65 7a 79 31 00 37 03  00 00 49 2e 45 54 55 30  |eezy1.7...I.ETU0|
00000020  2c 2d 00 ff f7 08 02 00  0f 80 15 00 00 00 00 00  |,-..............|
00000030  00 00 00 00 00 3d 2a 57  5b 43 7b 62 58 75 62 6c  |.....=*W[C{bXubl|
00000040  77 00 6d 79 73 71 6c 5f  6e 61 74 69 76 65 5f 70  |w.mysql_native_p|
00000050  61 73 73 77 6f 72 64 00  21 00 00 01 ff 84 04 23  |assword.!......#|
00000060  30 38 53 30 31 47 6f 74  20 70 61 63 6b 65 74 73  |08S01Got packets|
00000070  20 6f 75 74 20 6f 66 20  6f 72 64 65 72           | out of order|
0000007d

]

> 1:
> Every 1,0s: netstat -np|grep 3306
> Wed Sep 17 14:20:05 2014
> 
> tcp        0      0 10.6.0.200:43622        10.6.0.3:3306
> TIME_WAIT   -
> tcp        0      0 10.6.0.200:43621        10.6.0.3:3306
> ESTABLISHED 21326/isql
> tcp        0      0 10.6.0.200:43620        10.6.0.3:3306
> ESTABLISHED 21312/mysql

This shows mysql has an established connection to the remote machine. It
doesn't show at all what the remote machine is doing.

Have you examined the logs on the remote machine?

-- 
Don Armstrong                      http://www.donarmstrong.com

I will not make any deals with you. I've resigned. I will not be
pushed, filed, stamped, indexed, briefed, debriefed or numbered. My
life is my own. I resign.
 -- Patrick McGoohan as Number 6 in "The Prisoner"


Reply to: