Mysql8.0.16安装时出现的Database initialization failed解决方法

1、安装mysql8.016时到最后一步时,如下图,出现了小红点无法往下执行了,这是安装时出现的问题。

Mysql8.0.16安装时出现的Database initialization failed解决方法_第1张图片

2、问题分析及解决办法

  • 查看log,log的内容如下,我把log全部贴出来了,我们只看最后几行即可。
Beginning configuration step: Writing configuration file

Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file

Beginning configuration step: Updating Windows Firewall rules

Attempting to delete a Windows Firewall rule with command: netsh.exe advfirewall firewall delete rule name="Port 3306" protocol=TCP localport=3306

已删除 6 规则。
确定。


Adding a Windows Firewall rule for MySQL80 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
确定。


Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MySQL80 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
确定。


Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules

Beginning configuration step: Adjusting Windows service

Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Updating existing service
Existing service updated
Ended configuration step: Adjusting Windows service

Beginning configuration step: Initializing database (may take a long time)

Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.16...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
mysqld: File '.\閺夈劏澹撴稉?bin.index' not found (OS errno 2 - No such file or directory)
'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.16) initializing of server in progress as process 16328
Newly created data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ is unusable. You can safely remove it.
Aborting
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.16)  MySQL Community Server - GPL.
Process for mysqld, with ID 16328, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.16.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)
  • 出现的问题的log,就是他了
Failed to start process for MySQL Server 8.0.16.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

在这里插入图片描述

  • 奥哟哟,这个问题应该是在my.ini中,于是乎我们查看log日志文件如下

Mysql8.0.16安装时出现的Database initialization failed解决方法_第2张图片

  • 凭借敏捷的判断和高超的能力,我觉得这个是乱码,mysql不识别导致初始化失败的,奥利给,于是乎,我把他改成了英文,再次使用mysql installer进行配置如下,

Mysql8.0.16安装时出现的Database initialization failed解决方法_第3张图片
记得勾选皇框选中的内容。

Mysql8.0.16安装时出现的Database initialization failed解决方法_第4张图片

  • 动动手指,就是这里,改成全英文的就ok啦

Mysql8.0.16安装时出现的Database initialization failed解决方法_第5张图片

3、还是不行?

卸载mysql server服务,没必要全部卸载
Mysql8.0.16安装时出现的Database initialization failed解决方法_第6张图片重新安装mysql server,然后重新配置,log文件里记得中文哟

你可能感兴趣的:(Mysql8.0.16安装时出现的Database initialization failed解决方法)