mysql5 Ubuntu

Monday, February 16, 2009 |


MySQL: 5.0.45-Debian_1ubuntu3



I have faced a strange issue on _1ubuntu3. The server was failing to listen on the allocated IP address eventhough it was listening on Localhost.

root@blackroot:~# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
H
5.0.45-Debian_1ubuntu3-logMJk]m1FO,9nB;@q;pA6*m^]
telnet> quit

[root@blackroot~]# telnet 192.168.5.10 3306
Trying 192.168.5.10...
telnet: connect to address 192.168.5.10: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@blackroot ~]#

After few minutes of investigation on system/network settings and firewall I had noticed a configuration on my.cnf which was blocking the connection to the IP address.

root@blackroot:/etc/mysql# grep bind-address my.cnf
bind-address = 127.0.0.1
root@blackroot:/etc/mysql#

Commented the line and restarted mysql. Bing... the machine started listening on IP address.
Yup..its a security feature but it killed my time.

root@blackroot:/etc/mysql# grep bind-address my.cnf
#bind-address = 127.0.0.1
root@blackroot:/etc/mysql#

0 comments:

Post a Comment