MySQL connection refused: Can't connect to MySQL server

Refers to:

  • Plesk 12.0 for Windows

Created:

2016-11-16 13:12:04 UTC

Modified:

2016-12-21 20:10:38 UTC

0

Was this article helpful?


Have more questions?

Submit a request

MySQL connection refused: Can't connect to MySQL server

Symptoms

MySQL connection refused.

C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\bin>mysql.exe -uadmin -P3306 -p
Enter password: ********************
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

The following command returns a lot of connections in state SYN_RECEIVED .

    netstat -n -p tcp 
Proto Local Address Foreign Address State
TCP 127.0.0.1:1030 127.0.0.1:1032 ESTABLISHED
TCP 127.0.0.1:1032 127.0.0.1:1030 ESTABLISHED
TCP 10.57.8.190:3306 10.57.14.154:1256 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1257 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1258 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1256 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1257 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1258 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1256 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1257 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1258 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1256 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1257 SYN_RECEIVED
TCP 10.57.8.190:3306 10.57.14.154:1258 SYN_RECEIVED
TCP 10.57.8.190:4801 10.57.14.221:139 TIME_WAIT

Cause

Server is under a SYN attack.

Resolution

Block ip address which tries to establish SYN_RECEIVED connections.

More information about SYN attack:

Syn attack protection on Windows Vista, Windows 2008, Windows 7, Windows 2008 R2, Windows 8/8.1, Windows 2012 and Windows 2012 R2

Internet server unavailable because of malicious SYN attacks

Have more questions? Submit a request
Please sign in to leave a comment.