0

I'm running MySQL 5.6 on a WinServer 2012 system. It works great. The server is on our office intranet, not accessible to the outside world. I normally administer MySQL remotely from my office on my laptop, so I've got my user privileges set to accept my login from all hosts ("%").

This morning I came in and could not get a response remotely from MySQL. If I go to the server, the server manager shows MySQL is running (I've stopped and restarted the MySQL service to no avail). I can log in to MySQL locally from the server. Netstat shows:

TCP    0.0.0.0:3306     0.0.0.0:0       LISTENING

Going to my laptop, I try to telnet to the ip address of the server and port 3306 and get:

Could not open connection to the host, on port 3306: Connection failed

This happened one time about six months ago and I ended up having to just shut down the whole Windows Server machine (cycle power). When it came back up, everything was great. This time, I don't want to have to shut down the machine (it really disrupts users of other services on the machine).

I suspect the port is just bound for some reason and needs to be released and reset.

Any suggestions on how I can make the server accept remote connections again without cycling power?

Thanks.

EDIT 1:

Based on @GioMac's suggestion, I did a wireshark on both client and server. Both showed the same thing. Here is the server's wireshark capture.

The IP address ending in .20 is the server and the one ending in .30 is the client:

NO. Time        Source          Destination     Pro Len Info
89  4.141088    192.168.1.30    192.168.1.20    TCP 66  61697 → 3306 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
143 7.137597    192.168.1.30    192.168.1.20    TCP 66  [TCP Retransmission] 61697 → 3306 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
259 13.137832   192.168.1.30    192.168.1.20    TCP 62  [TCP Retransmission] 61697 → 3306 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 SACK_PERM=1

So, the packets are being received by the server TCP stack.

One other big piece of info: I've cycled power on the server hardware twice now. Still have the same problem. Please help. Thanks.

  • Did you tried restart MySql Service instead of whole system ? Any log on MySql log files ? – Froggiz Nov 20 '15 at 16:07
  • Regarding restarting MySQL service, yes (see 2nd paragraph). Regarding the log, there are no errors, just notes, with the final note being mysqld.exe: ready for connections. Version: 5.6.21-log' socket: '' port: 3306 MySL Community Server (GPL). Notice that the socket is empty. – Jonathan M Nov 20 '15 at 16:14
  • If you telnet the server ip t prot 3306 from your laptop does the connection estabilishes? – Fredi Nov 20 '15 at 16:27
  • @Fredi, No. I stated so above in my original post, paragraphs 4 and 5. – Jonathan M Nov 20 '15 at 16:31
  • @JonathanM sorry, you're right, i readed it as you were using mysql client. Do you have a firewall on the server by chance? Another thing i would check, be sure it's mysql that is listening on that port, see here how to do it: stackoverflow.com/questions/48198/… – Fredi Nov 20 '15 at 16:43
1

I can only speculate at this point, but the firewall would be a good place to start. Have a look the config to see if the port is closed.

  • No sweat. My pleasure. – Gmck Nov 20 '15 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.