title: Creating a MYSQL table in a Docker container with a SQL file
body: <p>I have created a MySQL docker container with</p>
  
  <pre><code>sudo docker run -d --name db-mysql -e MYSQL_ROOT_PASSWORD=mypassword -e MYSQL_DATABASE=DB mysql
  </code></pre>
  
  <p>I have <em>schema.sql</em> to create the schema</p>
  
  <pre><code>DROP DATABASE IF EXISTS `DB`;
  CREATE DATABASE `DB`;
  USE `DB`;
  
  DROP TABLE IF EXISTS `Occurrences`;
  CREATE TABLE `Occurrences` (
    `IdOccurrence` int NOT NULL AUTO_INCREMENT,
    `Name` varchar(100) NOT NULL,
    `Min_probability` double NOT NULL,
    PRIMARY KEY (`IdOccurrence`)
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
  INSERT INTO `Occurrences` VALUES (1,'Frequent',20),(2,'Probable',10),(5,'Possible',1),(6,'Rare',0.1),(7,'Remote',0);
  </code></pre>
  
  <p>And try to import it (in Ubuntu 18.04) with</p>
  
  <pre><code>sudo docker exec db-mysql mysql -uroot -pmypassword DB &lt; schema.sql
  </code></pre>
  
  <p>However, I get this warning</p>
  
  <pre><code>mysql: [Warning] Using a password on the command line interface can be insecure.
  </code></pre>
  
  <p>But the database DB remains empty.</p>
  
  <p>Where is my error?</p>