title: How to use MariaDB in Docker?
body: <p>I am trying to setup a MariaDB container to use in Docker, but I seem to be doing something wrong. I start by downloading and then running it with this command:</p>
  
  <pre><code>docker run -p 127.0.0.1:8002:80 --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -v c:/mysql -d mariadb:latest
  </code></pre>
  
  <p>It downloads it a runs the container. Then I try to run this SQL command on it:</p>
  
  <pre><code>docker exec -it some-mariadb mysql -p -e 'select * from my_table' my_db
  </code></pre>
  
  <p>And it gives me the usage information for MySql... I don't understand what I am doing wrong? I am doing this on a Windows machine, if that makes a difference.</p>