我也遇到相同的问题了
`
docker run \-p 4406:3306 \
-e MYSQL_ROOT_PASSWORD=localDocker@mysql \
-e TZ=Asia/Shanghai \
-v /mnt/hgfs/docker/mysql/data:/var/lib/mysql \
-v /mnt/hgfs/docker/mysql/log:/var/log/mysql:rw \
-v /mnt/hgfs/docker/mysql/mysql-files:/var/lib/mysql-files/ \
--name mysql \
--restart=always \
--privileged=true \
-d mysql
`
容器日志
`
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.,
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql',
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.,
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Initializing database files,
mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied),
2020-11-16T13:02:35.467186Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.22) initializing of server in progress as process 42,
2020-11-16T13:02:35.468548Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.,
2020-11-16T13:02:35.468556Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.,
2020-11-16T13:02:35.468587Z 0 [ERROR] [MY-010119] [Server] Aborting,
2020-11-16T13:02:35.468687Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL.,
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.,
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql',
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.,
2020-11-16 21:02:35+08:00 [Note] [Entrypoint]: Initializing database files,
mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied),
2020-11-16T13:02:35.924495Z 0 [System] [MY-013