MySQL8.0.27安装过程中卡在Initializing Database中并报错

在这里插入图片描述
报错信息如下:

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.27…
Starting process with command: C:\software\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file=“C:\software\MySQL\Data\MySQL Server 8.0\my.ini” --console --initialize-insecure=on --lower-case-table-names=1…
mysqld: File ‘.\瀛欎笉鍧?208-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:\software\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.27) initializing of server in progress as process 11132
The newly created data directory C:\software\MySQL\Data\MySQL Server 8.0\Data\ by --initialize is unusable. You can remove it.
Aborting
C:\software\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.27) MySQL Community Server - GPL.
Process for mysqld, with ID 11132, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.27.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

解决方案:

原因:my.ini在创建时不能编译中文然后乱码,然后读取my.ini文件时遇到乱码无法继续运行。
解决办法:将计算机名字、组名等所有中文改成纯英文(右键我的电脑属性–>查看自己的计算机名和组名是否为中文–>更改计算机名和组名–>重启计算机),卸载之前所安装的mysql server,清理注册表,卸载mysql服务,删除data数据,重启计算机使计算机改名生效,重装mysql server。
在这里插入图片描述
如此便成功解决了。

附:清理注册表的方法
Win+R 输入 regedit 运行,进入注册表编辑器,按下图路径,找到MySQL,进而删除MySQL注册表信息。
在这里插入图片描述

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

请你喝杯Java⁡

感谢您的支持

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

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

打赏作者

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

抵扣说明:

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

余额充值