[chef] why does mysql on ec2 bind to priviate i.p?


Chronological Thread 
  • From: S Ahmed < >
  • To:
  • Subject: [chef] why does mysql on ec2 bind to priviate i.p?
  • Date: Tue, 13 Nov 2012 23:28:45 -0500

I noticed when I used the mysql recipe it installs mysql and binds it to the private i.p on ec2, why is that?

My application can't connect as it uses 'localhost' (jdbc), but for some reason it works fine using ruby.

Doing:

telnet localhost 3306
it says unable to connect to remote host: connectino refused

telnet x.x.x.x 3306 (ec2 private ip) it works.

The private ip isn't even in my /etc/hosts file either which was another source of confusion for me :)

Is there a good reason for this? What is wrong with localhost?

server.rb has the following:

default['mysql']['bind_address']               = attribute?('cloud') ? cloud['local_ipv4'] : ipaddress

my.cnf gets set with this:

bind-address x.x.x.x





Archive powered by MHonArc 2.6.16.

§