我正在尝试在 Windows 10 上安装 MySQL Server 8.0.34(下载自:

大约一个月前,我在我的电脑上安装了完全相同的版本,但我必须将其格式化,现在我试图重新安装它,但这变得不可能。

我尝试按照一个月前的方式安装它。我安装了 MySQL Server 8.0.34 X64、MySQL Workbench 8.0.23 X64、MySQL Shell 8.0.23 X64。

在“应用配置”时,我在“初始化数据库”步骤中收到错误。日志:

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 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
Aceptar


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
Aceptar


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.
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 8.0.33...
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...
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.33) initializing of server in progress as process 1456
Unknown suffix '.' used for variable 'mysqlx-port' (value '0.0').
option 'mysqlx-port': unsigned value 0 adjusted to 1.
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Error while setting value '0.0' to 'mysqlx-port'.
Parsing options for plugin 'mysqlx' failed.
InnoDB initialization has started.
InnoDB initialization has ended.
unknown variable 'mysqlx_port=0.0'.
The newly created data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ by --initialize is unusable. You can remove it.
Aborting
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.33)  MySQL Community Server - GPL.
Process for mysqld, with ID 1456, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.33.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

我试过:

  1. 从控制面板卸载所有内容
  2. 从中删除 MySQL 文件夹
  • 目录:\Program Files\MySQL
  • 目录:\ProgramData\MySQL
  • C:\用户\管理员\应用程序数据\漫游\MySQL
  1. Windows + R > 输入“regedit” > 搜索“HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB” > 删除 MySQL AB。(还查找了“HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\MySQL”,但我没有找到此文件夹)。

  2. 以 admon 身份打开 cmd 并尝试运行

    停止 MySQL

    删除 MySQL

但这些都不起作用。5.我还在 cmd 上检查了端口 3306 是否被使用,但没有

我重启了电脑并尝试重新安装,但还是出现了同样的错误。在重新安装之前,我反复检查了所有东西是否都已卸载,但尽管我尝试了几次,还是出现了同样的错误。

然后我想到先完成安装,然后再尝试修复问题。之后,MySQL Shell 打开了,例如 Workbench 但是,我无法连接服务器 [未建立连接 / 服务器状态:已停止]

我检查了一些视频并尝试了一些方法使其发挥作用:

  1. 我导航到“服务”。我查找 MySQL80 服务,尝试手动启动服务器,但出现“在本地计算机上启动然后停止。如果某些服务未被其他服务或程序使用,则会自动停止。”错误

  2. 为了尝试解决这个问题,我打开了 Windows cmd,导航到 MySQL\MySQL Server 8.0\bin 并输入

    mysqld –已初始化

,然后我尝试再次启动它,但收到相同的消息并且无法连接。我没主意了。

知道可能是什么问题吗?

$(function() {
$(“.js-gps-inline-related-questions .spacer”).on(“click”, function () {
fireRelatedEvent($(this).index() + 1, $(this).data(‘question-id’));
});

function fireRelatedEvent(position, questionId) {
StackExchange.using(“gps”, function() {
StackExchange.gps.track(‘related_questions.click’,
{
position: position,
originQuestionId: 78664672,
relatedQuestionId: +questionId,
location: ‘inline’,
source: ‘Baseline_Fallback’
});
});
}
});

function toggleInlineRelated(showMore) {
var inlineRelatedLess = document.getElementById(“inline_related_var_a_less”);
var inlineRelatedMore = document.getElementById(“inline_related_var_a_more”);

var inlineRelatedSeeMore = document.getElementById(“inline_related_see_more”);
var inlineRelatedSeeLess = document.getElementById(“inline_related_see_less”);

if (showMore) {
inlineRelatedLess.classList.add(“d-none”);
inlineRelatedSeeMore.classList.add(“d-none”);

inlineRelatedMore.classList.remove(“d-none”);
inlineRelatedSeeLess.classList.remove(“d-none”);
}
else {
inlineRelatedMore.classList.add(“d-none”);
inlineRelatedSeeLess.classList.add(“d-none”);

inlineRelatedLess.classList.remove(“d-none”);
inlineRelatedSeeMore.classList.remove(“d-none”);
}
}

0