First of all I’m sorry if I miss some informations for you guys to be able to help me. It’s my first time posting here and my first time using Portainer and Docker.
For context: I am using portainer with a stack that has two containers, one hosting a MariaDB image and one hosting a (modified to have the mysql-client package) PureFTPD image.
I made a quick bash script that is used to retrieve data from the FTP server and send it to the database. Everything worked well on my locally hosted MariaDB but when I tried the script on my FTP server, I was never able to connect to the db.
My question is, how can you find all the informations that are needed to connect to the db when executing the script from another container in the same stack ?
Thanks a lot for your time and have a great day!
I tried using the IP adress written on the container of my MariaDB, I tried 0.0.0.0, I tried localhost, I tried the service name and I always got the error “Can’t connect to MySQL server on …”
user26024746 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.