title: How to mount Docker MySQL Data/Socket volume on Windows 10?
body: <p>I'm trying to simply run the latest docker mysql image on windows 10 with a data directory from the host mounted.</p>
  
  <p>I'm running </p>
  
  <pre><code>docker run --rm --name=mysql --mount type=bind,src="C:\Docker Projects\mysql\mysql_data",dst=/var/lib/mysql mysql/mysql-server  
  </code></pre>
  
  <p>But it's complaining about a socket not being present.</p>
  
  <pre><code>2020-01-20T17:23:22.758269Z 0 [ERROR] [MY-010270] [Server] Can't start server : Bind on unix socket: Operation not permitted
  2020-01-20T17:23:22.758416Z 0 [ERROR] [MY-010258] [Server] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
  </code></pre>
  
  <p>I can see a mysql mysql.sock.lock is created. I've also tried creating a mysql.sock file from the host.</p>
  
  <p>I think this is telling me I need to specify where the socket file is for windows <a href="https://dev.mysql.com/doc/refman/5.7/en/deploy-mysql-nonlinux-docker.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/5.7/en/deploy-mysql-nonlinux-docker.html</a> but I can't seem to get the command syntax right?</p>