报错Log:Database initialization failed.
- 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
- Adding a Windows Firewall rule for MySQL91 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 MySQL91 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 the required filesystem permissions to the 'NT AUTHORITY\NetworkService' account.
- Granted permissions to the data directory.
- Granted permissions to the install directory.
- Adding new service
- New service added
- 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 9.1.0...
- Starting process with command: C:\Program Files\MySQL\MySQL Server 9.1\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 9.1\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
- Process for mysqld, with ID 7608, was run successfully and exited with code -1073741819.
- Failed to start process for MySQL Server 9.1.0.
- Database initialization failed.
- Ended configuration step: Initializing database (may take a long time)
复制代码 实验问题复现
寻找方法
- 其他网上的各种实验啦,比如:
- 修改电脑名字为中文
- 修改my.ini文档内里的文字为中文
- 授权Beta 版: 使用 Unicode UTF-8 提供环球语言支持(U)
等等,都不太行
- 终极在这篇Blog的引导下解决了这个问题。
- mysql的两个主要问题是
附录
- 怎样删除已经创建的MySQL91服务:
使用注册表卸载服务
使用Windows + R快捷键打开「运行」对话框,执行regedit打开注册表编辑器。导航到以下路径HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services,找到MySQL91删除即可。方法来自系统极客:4 种简单方法,帮你轻松删除 Windows 服务,我前两种方式没有实验成功,第四种方式我没有实验,由于不如第三种方式优雅。
- 另一种安装方式
笔者在问题解决之前是通过把从MySQL官网下载的解压包zip解压之后,根据这篇文档的教程配置初始化文件mysql.ini和新建data文件夹也是可以使用的。
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |