Link between mysql and php

Hello,
I’m a new user of rancher.
I wanted to create a new stack with phpmyadmin and mysql but something does not work.

This is my docker-compose.yml, it works perfectly with docker-compose without rancher.

db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USERNAME=root
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- db:db
ports:
- “8080:80”

When i’m trying to connect with phpmyadmin i have an error #2002 - Operation timed out — The server is not responding (or the local server’s socket is not correctly configured).

Thank you for your help !

It’s not clear, are you unable to connect to PhpMyAdmin, or are you unable to connect to MySQL?

Don’t forget that MySQL has to be started twice, once to initialize, once to run.

I can not connect to mysql with phpmyadmin, when i try to connect in the phpmyadmin login screen the #2002 appear.
The 2 containers are up.