How to handle IP addresses when linking docker containers with each other using docker-compose?

I am using docker-compose to build a complete development stack. The application needs a mysql server to work. The mysql server is an external container setup by docker-compose: mysql: image: