Resolved Solution for “telnet could not open connection to the host on port 3306″

Jan 16 2010 Published by under Other tech stuff

Check the following:

Step 1. Make sure mysql is up and running

Windows – Check in task manager for mysqld-nt

Linux based (Ubuntu, debian etc.,) – service mysql status

or ps -elf | grep mysql

Step 2. Make sure the port is in LISTEN mode

Windows – netstat -a | find LISTEN

Linux – netstat -a | grep LISTEN


or netstat -a | grep mysql

Step 3. Make sure your firewall is not blocking

Windows – Somewhere in network connections – OH ! you can goole and find where to set windows firewall rules

Linux (ubunti) – ufw allow 3306

Step 4. Telnet – telnet <ip> 3306 and then you the error

“telnet could not open connection to the host on port 3306″

Change the bind ip address in mysql Configuration file

OPen your my.cnf file (/etc/mysql/my.cnf in Ubuntu) and go to bind-address and change it to your system IP address or server name.

This should work.

No responses yet

Leave a Reply