[求助] win10下新安装的docker安装mysql5.7失败
2019-01-26 20:26:41
  • 访问次数: 3
  • 注册日期: 2018-08-19
  • 最后登录: 2019-01-26

现象:win10下docker安装mysql5.7失败

步骤:

  1. 执行安装命令  docker run -di --name=test_mysql -e MYSQL_ROOT_PASSWORD=123456 mysql:5.7 

  2. 查看容器  docker ps -a  显示当前容器已经Exited


mysql错误日志:

PS C:\WINDOWS\System32> docker logs 0d411f546a65

Initializing database

2019-01-26T12:08:45.815622Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)

2019-01-26T12:08:45.815736Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)

2019-01-26T12:08:45.815963Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-01-26T12:08:45.829266Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive

2019-01-26T12:08:45.912128Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 95

2019-01-26T12:08:45.912698Z 0 [ERROR] InnoDB: Operating system error number 95 in a file operation.

2019-01-26T12:08:45.912851Z 0 [ERROR] InnoDB: Error number 95 means 'Operation not supported'

2019-01-26T12:08:45.912926Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'

2019-01-26T12:08:45.913110Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!

2019-01-26T12:08:45.913258Z 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.

2019-01-26T12:08:46.514425Z 0 [ERROR] Plugin 'InnoDB' init function returned error.

2019-01-26T12:08:46.514476Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2019-01-26T12:08:46.514505Z 0 [ERROR] Failed to initialize builtin plugins.

2019-01-26T12:08:46.514538Z 0 [ERROR] Aborting


尝试解决方案:

  1. 清除所有docker容器和volume后重试失败

  2. 查找本机残留mysql配置文件,清除注册表后重试失败

  3. 重装docker重试失败



沙发
2019-01-27 01:47:06
李明
  • 访问次数: 377
  • 注册日期: 2018-07-09
  • 最后登录: 2019-10-30

 InnoDB: InnoDB Database creation  was aborted with error Cannot open a file. Y  欢迎是管理员权限才可以 ,你的权限有问题

1/1