Mysql – “Connection to host lost” using telnet to MySQL

MySQL

I am trying to setup MySQL Workbench to manage a remote database and I keep getting "waiting for initial communication packet" error. So I try to telnet to the box on port 3306, I get in, but then I get the following message and the connection gets dropped:

"5.5.13-enterprise-commerical-advanced-log?||Dn}I3aooo;'QC=D!umysql_native_password
Connection to host lost

What can be the issue here?

Best Answer

What you're seeing with the telnet test looks like normal behavior, since mysql doesn't "speak telnet," so the result may not be all that helpful... all it really tells us is that a TCP connection to the remote machine is at least possible.

sqlbot@dev:~$ telnet 10.20.30.40 3306
Trying 10.20.30.40...
Connected to 10.20.30.40.
Escape character is '^]'.
N
5.5.15-log|     \Q_l"`>SÀh4e$~rA/b$'9mysql_native_passwordConnection closed by foreign host.

sqlbot@dev:~$

A better test would be to try the MySQL command line client -- from the same machine where you're getting the error from on workbench. Whether that succeeds or fails will probably be more informative.

How long does it take for the message to appear?