Transfer token nginx docker swarn

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

I am trying to automate data transfer from a strapi stage and live install running on a docker swarm where each strapi container runs behind a nginx. Right now i am stuck with the database access on stage: Access denied for user 'user'@'' (using password: YES). This is because the ip resolves to the strapi host - not the database host. Anybody has an idea how to fix this?

If i write a node connection test script i can connect two both mysql server, i even changed the passwords to be the same user password. it seems either the password is not present or the host name. its really strange.

so in the end it was the strapi cli obviously does not have the env variables available that where passed to the docekr container during deploy. A simple source .env && export $(cut -d= -f1 < .env) before running the command did the trick