我需要为数据库文件安装一个卷,然后输入以下命令。
docker run -v C:\db\d4:/var/lib/mysql mysql/mysql-server:5.6
但是,容器似乎无法启动。我注意到已在挂载的文件夹中创建了数据文件。
我正在使用Windows 10,Docker 18.09.1,内部版本4c52b90
这是输出。
C:\db>docker run -v C:\db\d4:/var/lib/mysql mysql/mysql-server:5.6
[Entrypoint] MySQL Docker Image 5.6.43-1.1.10
[Entrypoint] No password option specified for new database.
[Entrypoint] A random onetime password will be generated.
[Entrypoint] Initializing database
2019-02-08 17:05:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-08 17:05:26 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2019-02-08 17:05:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.43) starting as process 20 ...
2019-02-08 17:05:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-08 17:05:31 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2019-02-08 17:05:31 0 [Note] /usr/sbin/mysqld (mysqld 5.6.43) starting as process 42 ...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h b6b2a0a64aa6 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Note: new default config file not created.
Please make sure your config file is current
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server
[Entrypoint] Database initialized
[Entrypoint] Waiting for server...
2019-02-08 17:05:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-08 17:05:33 0 [Note] mysqld (mysqld 5.6.43) starting as process 65 ...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Waiting for server...
[Entrypoint] Timeout during MySQL init.
C:\db>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
C:\db>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
C:\db>
有人可以帮我在这里缩小问题的范围。