Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

EC2 instances have an Amazon "internal" IP address (something like and one that can be used from the outside world (e.g.

I used to access a MySQL database only from within the instance itself, but now need to change that. In /etc/mysql/my.cnf, I've commented out skip-external-locking, and I replaced

bind-address        =

... with the EC2 internal IP address, which got remote access working ok (with appropriate EC2 security group settings, of course). But now it can't be accessed by processes locally using a database url such as mysql://localhost/dbname.

Is it possible to both have remote access working and still use "localhost" when connecting to the database locally? If so, how? (Or do I just have to change local configurations to also use an IP like when connecting to the MySQL db on the same host?)

share|improve this question
up vote 2 down vote accepted

You should just comment this line or provide, and it will bind to all addresses.

share|improve this answer
Yes, this worked. Thanks! – Jonik Jun 30 '11 at 13:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.