Docker Community Forums

Share and learn in the Docker community.

Docker for Window 启动mysql失败


#1

C:\Users\Administrator\mydocker>docker run --name mysql -e MYSQL_ROOT_PASSWORD=yuanhy -d mysql:latest
bf43d257bbb21fd953503788ba1a2c0ab7e01453f10f99201d69b3ace40e490a

C:\Users\Administrator\mydocker>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

C:\Users\Administrator\mydocker>docker logs bf43
Initializing database
2019-01-07T06:45:17.742673Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 1024 (requested 8161)
2019-01-07T06:45:17.742781Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 431 (requested 4000)
2019-01-07T06:45:17.743101Z 0 [Warning] [MY-011070] [Server] ‘Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it’ is deprecated and will be removed in a future release.
2019-01-07T06:45:17.743529Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.13) initializing of server in progress as process 39
2019-01-07T06:45:17.747461Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2019-01-07T06:45:17.747644Z 0 [ERROR] [MY-013236] [Server] Newly created data directory /var/lib/mysql/ is unusable. You can safely remove it.
2019-01-07T06:45:17.747688Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-01-07T06:45:17.748001Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.13) MySQL Community Server - GPL.