title: Creating new user beside root in docker-compose having connections issues
body: <p>I  am running a docker stack using the docker-compose . The docker-compose.yml looks something like below. The problem is if I add the default user root then it works fine but changing the user to another user say <strong>tara</strong> throws an error.</p>
  
  <p><strong>I repeat:</strong>
  <em>Works well for user: root</em> </p>
  
  <p><strong><em>Note I am running it on 3 nodes  with single replica. So the service may be running in any of the nodes.</em></strong></p>
  
  <pre><code>"SQLSTATE[HY000] [1130] Host '10.0.10.6' is not allowed to connect to this MySQL server (SQL: select count(*) as aggregate from `users` where `email` = ramesh@gm ▶"
  </code></pre>
  
  <p><strong>Here is the docker-compose.yml</strong></p>
  
  <p>version: '3.3'</p>
  
  <p>networks:
    smstake: 
      ipam:
        config:
          - subnet: 10.0.10.0/24</p>
  
  <p>services:</p>
  
  <pre><code>db:
      image: mysql:5.7
      networks:
        - smstake
      ports:
        - "3306:3306"
      volumes:
        - db_data:/var/lib/mysql
      environment:
        MYSQL_ROOT_PASSWORD: password
        MYSQL_DATABASE: smstake
        MYSQL_USER: tara
        MYSQL_PASSWORD: password
      deploy:
        mode: replicated
        replicas: 1
  
  app:
  
      image: smstake:latest
      ports:
        - 8000:80
      networks:
        - smstake
      deploy:
        mode: replicated
        replicas: 1
        placement:
          constraints:
            - node.role == manager
  
  phpmyadmin:
      image: phpmyadmin/phpmyadmin
      networks:
        - smstake
      environment:
        PMA_HOST: db
        PMA_PORT: 3306
        MYSQL_USER: tara
        MYSQL_PASSWORD: password
      ports:
        - '8082:80'
      deploy:
        mode: replicated
        replicas: 1
  </code></pre>
  
  <p>volumes:
      db_data:</p>
  
  <p><strong>All 3 services are running just a issues with connections.</strong></p>
  
  <blockquote>
    <p>People are suggesting to run grant commands  but where and how can I
    make those commands run ?</p>
  </blockquote>