Conneection not establishing between mysql and project container


I followed the below document and iam able to run two contaners, one is main where application is running and other one is mysql container. but the connection is not happening between those two containers and iam getting following exception.

Please suggest