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

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

在这里插入图片描述

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日志文件如下

在这里插入图片描述

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

在这里插入图片描述
记得勾选皇框选中的内容。

在这里插入图片描述

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

在这里插入图片描述

3、还是不行?

卸载mysql server服务,没必要全部卸载
在这里插入图片描述重新安装mysql server,然后重新配置,log文件里记得中文哟

  • 60
    点赞
  • 64
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 20
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 20
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

-西门吹雪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值