SQL Error (2003): Can’t connect to MySQL server on ‘X.X.X.X.’ (10051) – What does this error mean?

I get following error when i try to connect via “HeidiSQL” to my database server (local network)

SQL Error (2003): Can’t connect to MySQL server on ‘X.X.X.X.’ (10051)

SSH Connection via Putty works fine. I checked the my.cnf file on the server (Ubuntu), but settings like bind_address are correct.

Is it possible that my wireless modem (SpeedTouch) makes this trouble? (Because my provider changed the download speed) !

Answer

If you can’t connect to your server directly, but can connect through a SSH tunnel then usually the server is just only listening on localhost. As far as I know, that is the default on Ubuntu system.

When you say the bind-address is “correct”, then I assume you changed it to your public IP address. In that case, make sure you restarted mysqld after you made that change.
Additionally, the listening port (3306 by default) could be blocked in ufw or some other firewall in place.

Attribution
Source : Link , Question Author : BeeS , Answer Author : Oliver Salzburg

Leave a Comment