Client Error Codes > 2003

Categories

Client Error Codes, Error Codes

Definition

Error 2003 indicates that the mysql client was unable to establish a connection with the MySQL server you specified.

Sample

C:\Documents and Settings\Administrator>mysql -u root -h 127.0.0.1 -p
Enter password: *****
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1′ (10061)

Resolution

  • Did you specify the correct hostname or IP address for the MySQL server? If you do not specify one, the local machine is used as a default.
  • Is the MySQL server running? Check the process list on the server machine.
  • Is there a firewall blocking port 3306 at some point between the client and server? (If you are trying to reach a server provided by a hosting company this is likely).
  • Is the MySQL server configured to listen on port 3306? If not, you need to specify the right port number with the -P option.

Further Reference

Client Error Codes and Messages (MySQL Reference Manual)

Experts-Exchange Question on Error 2003

Accessing MySQL Through a Firewall With SSH Port Forwarding

Leave a Reply