Docker安装mysql5.7

Docker安装MySQL5.7

docker pull mysql:5.7
docker run 

Note:

报错:

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/mysql/conf" to rootfs at "/etc/my.cnf": mount /home/mysql/conf:/etc/my.cnf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

处理:

  • cd到 /home/mysql/conf
  • vi 一个 my.cnf
  • 然后chmod 775 my.cnf
  • 然后 docker rm后,再run,就行了
posted @ 2024-01-09 15:33  李济宏(Amadeus)  阅读(92)  评论(0编辑  收藏  举报