2

I have a fixed IP attached to my EC2 instance. I am able to test the connection with nc as follows.

$ nc -v **.***.***.** 3306
Ncat: Version 6.25 ( http://nmap.org/ncat )
Ncat: Connection refused.

But,

$ nc -v **.***.***.** 22
Ncat: Version 6.25 ( http://nmap.org/ncat )
Ncat: Connected to **.***.***.**.
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1

In my security group I have two rules:

1) Inbound 22 from 0.0.0.0/0

2) Inbound 3306 from 0.0.0.0/0

What am I missing?

artdv
  • 774
  • 1
  • 8
  • 23
  • Is MySQL/MariaDB up and listening on that IP? Try to verify it with `nc` locally on the EC2 instance. – dcro Sep 11 '13 at 05:44
  • `$ nc -v 127.0.0.1 3306` `Connection to 127.0.0.1 3306 port [tcp/mysql] succeeded!` `[` `5.5.32-0ubuntu0.12.04.1VT"K6g)3��bvJP2IWY<^Dzmysql_native_password` Looks like it's connecting – artdv Sep 11 '13 at 17:35

1 Answers1

1

Ok, I found that answer to this.

I was under the impression that in /etc/mysql/my.cnf, I simply had to comment skip-networking (which does not appear in MySQL my.cnf past a certain version). Turns out you also have to comment out #bind-address = 127.0.0.1 .

nc threw me off, I thought the problem was at the firewall. I'll still be happy to accept as a correct answer anyone who can shed light on what bind-address achieves.

Thanks.

artdv
  • 774
  • 1
  • 8
  • 23