Problem with MYSQL connection in container?

Hi there, I need some help:

This simple docker config is running fine on my local machine (no rancher):
but I keep getting the can’t connect to MYSQL error within rancher

Does anyone know why?

Thank you very much,

can anyone help me maybe?