Everything I Plan on Forgetting

notes and cool things on the stupid stuff i do

« Back to blog

can't start mysql with bind address

Wow what a nightmare.  I'm trying to grant remote mysql access on my ec2 instance.  So I go though the steps

  1. edit /etc/mysql/my.cnf and change the bind-addess to my server ip
  2. create a new user in mysql, grant privileges and flush privileges
  3. open up mysql port on ec2 console security tab
  4. ok time to restart mysql now with /etc/init.d/mysql restart

Got the error message:

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql restart

Ok no problem let's try the new way with 'service mysql restart'

and it hangs..........  Two hours later i'm hating computers.  Ok but here's the trick.

 

In short here's the answer.  The amazon gives out elastic ips and this is what i put as my bind-address back in step one.  Apparently this is not the right address and they don't propery give me an error message to tell me this.  type ifconfig, get the private ip address and set it there.  Voila.  There ya go.