To allow connections from outside, I edited /etc/mysql/my.cnf
to change the bind-address
from the default value 127.0.0.1
to 54.200.xx.xx
. But after changing making the change, mysql service won't start. When I checked the mysql error log, it has this:-
131030 12:27:53 [Note] Server hostname (bind-address): '54.200.xx.xx'; port: 3306
131030 12:27:53 [Note] - '54.200.xx.xx' resolves to '54.200.xx.xx';
131030 12:27:53 [Note] Server socket created on IP: '54.200.xx.xx'.
131030 12:27:53 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
131030 12:27:53 [ERROR] Do you already have another mysqld server running on port: 3306 ?
131030 12:27:53 [ERROR] Aborting
The server is on Amazon EC2, running Ubuntu 12.04 LTS. Any idea what the problem is?
ubuntu@ip-172-31-xx-xxx:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 12:ad:52:a1:9b:a9
inet addr:172.31.xx.xxx Bcast:172.31.xx.xxx Mask:255.255.240.0
inet6 addr: fe80::10ad:52ff:fea1:9ba9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1014 errors:0 dropped:0 overruns:0 frame:0
TX packets:749 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:87102 (87.1 KB) TX bytes:138261 (138.2 KB)
Interrupt:25
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:152 errors:0 dropped:0 overruns:0 frame:0
TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11740 (11.7 KB) TX bytes:11740 (11.7 KB)
netstat -lnp | grep 3306