title: Sql dump does not run in docker-compose
body: <p>I am quite new to Docker and I have run into a problem. The basic thing I'm trying to do, is to connect a java service to a mysql database. </p>
  
  <p>The setup is that I have one Dockerfile for the service, and a separate one for mysql. Then I'm connecting these through a docker-compose file.</p>
  
  <p>The Dockerfile for the database copies a db dump into the container, but it's not working when I check it in mysql workbench (or sequel pro). Both containers are up and running.</p>
  
  <p>I have created a new user in workbench called dbuser with the right password. But this user is not granted access to create this database. </p>
  
  <p>I had problems with the passwords in workbench earlier on, and got passed them by changing the mysql image from :latest to :5.7.</p>
  
  <p>I can connect to localhost:3307 in Workbench but there is no database there. </p>
  
  <p>The dump grants all access to my dbuser. I have inspected the container and the image so I know the dump is in there. But it seems like Docker never get to the point of running the dump, and I suspect that this is due to something I have done wrong. </p>
  
  <p>All help is very appreciated!</p>
  
  <p>Dockerfile for db</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>FROM mysql:5.7
  
  ENV MYSQL_ROOT_PASSWORD=root
  ENV MYSQL_ALLOW_SECRET_PASSWORD=yes
  
  COPY Dump20180430.sql /docker-entrypoint-initdb.d</code></pre>
  </div>
  </div>
  </p>
  
  <p>docker-compose</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>version: '3.4'
  
  services:
    productservicejava:
      image: productservicejava
      build:
        context: .
        dockerfile: Dockerfile
      depends_on:
        - db
      ports:
        - "8080:8080"
    db:
      image: productservicedb
      build:
        context: .
        dockerfile: DockerfileDb
      ports:
        - "3307:3306"</code></pre>
  </div>
  </div>
  </p>
  
  <p>Edit: adding part of the log from running the db container. No errors but some warnings.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>db_1                  | 2018-05-24T12:13:38.522966Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
  db_1                  | 2018-05-24T12:13:38.524314Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.524363Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.524377Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.524412Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.524419Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.524432Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.527659Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
  db_1                  | 2018-05-24T12:13:38.527679Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.</code></pre>
  </div>
  </div>
  </p>