无法在 Windows 10 上安装 MySQL - 安装程序无限期挂起

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48412727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 22:52:26  来源:igfitidea点击:

Unable to install MySQL on Windows 10 - Installer hangs indefinitely

mysqlwindows

提问by KRM

I am trying to install MySQL on a Windows 10 PC. I downloaded the installer package and followed those steps

我正在尝试在 Windows 10 PC 上安装 MySQL。我下载了安装程序包并按照这些步骤操作

  1. Went to https://dev.mysql.com/downloads/windows/
  2. clicked on "MySQL Installer"
  3. Scrolled to Generally Available(GA) Releases section
  4. Clicked on "Windows (x86, 32-bit), MSI Installer" (mysql-installer-community-5.7.21.0.msi) and it started the download.
  5. Once the download was complete, I double clicked on the installer and it gave a usual pop-up for any installation like,"Do you want this app to make changes to your device?" after clicking on "yes" for the answer to this question, it shows "Please wait while Windows configures MySQL-Installer-community" like below screenshot.
  1. 去了https://dev.mysql.com/downloads/windows/
  2. 单击“MySQL 安装程序”
  3. 滚动到一般可用(GA)版本部分
  4. 单击“ Windows(x86,32位),MSI 安装程序”(mysql-installer-community-5.7.21.0.msi)并开始下载。
  5. 下载完成后,我双击安装程序,它会为任何安装提供一个通常的弹出窗口,例如“您希望此应用程序对您的设备进行更改吗?” 单击“是”以获得此问题的答案后,它显示“请稍候,Windows 正在配置 MySQL-Installer-community”,如下图所示。

enter image description here

在此处输入图片说明

And then it keeps showing this installation progress bar for a very long time. Like more than 7-8 hours and the installation never completes

然后它一直显示这个安装进度条很长一段时间。像超过 7-8 小时,安装永远不会完成

So it seems something is wrong as I don't think MySQL installation needs this long time. I tried to restart my computer and then delete any files related to MySQL from my computer and then started the whole process of installation again. But no luck yet

所以似乎有些问题,因为我认为 MySQL 安装不需要这么长时间。我尝试重新启动计算机,然后从计算机中删除与 MySQL 相关的所有文件,然后再次开始整个安装过程。但还没有运气

Anyone has any suggestion on this or did anyone face this kind of issue before? If so, is there a fix or a work around for this?

任何人对此有任何建议,或者以前有人遇到过这种问题吗?如果是这样,是否有解决方法或解决方法?

回答by KRM

ok. So finally this is how I resolved my issue. And I found the solution at https://bugs.mysql.com/bug.php?id=82004. The solution to this problem is to close an open "Windows installer" (the one using 0 memory and CPU) via task managerand the installation should begin running as expected.

好的。所以最后这就是我解决我的问题的方法。我在https://bugs.mysql.com/bug.php?id=82004找到了解决方案 . 解决此问题的方法是通过任务管理器关闭打开的“Windows 安装程序”(使用 0 内存和 CPU的安装程序,安装程序应按预期开始运行。

回答by Winston C. Yang

Alternative solution: Use an administrator command prompt to run the MySQL installer on Windows 10. Details:

替代解决方案:使用管理员命令提示符在 Windows 10 上运行 MySQL 安装程序。详细信息:

(Note: if you have any problems in the following steps, you can try to restart your computer. Then restart the steps.)

(注意:如果您在以下步骤中遇到任何问题,可以尝试重新启动计算机。然后重新启动步骤。)

  1. Right-click the Start/Windows icon in the bottom-left corner of Windows.
  2. Click: Windows PowerShell (Admin).
  3. A window asks: Do you want to allow this app to make changes to your device? Click: Yes.
  4. Change to the directory with the MySQL installer. For example, if you downloaded the MySQL installer, type something like:
  1. 右键单击 Windows 左下角的开始/Windows 图标。
  2. 单击:Windows PowerShell(管理员)。
  3. 一个窗口询问:您是否要允许此应用对您的设备进行更改?点击:是。
  4. 切换到 MySQL 安装程序所在的目录。例如,如果您下载了 MySQL 安装程序,请键入以下内容:

cd C:\Users\my_username\Downloads\

cd C:\Users\my_username\Downloads\

(Note: To save some typing, you can type a few characters, and then press the tab key, to make Windows show you various auto-completion options.)

(注意:为了节省一些输入,您可以输入几个字符,然后按 Tab 键,让 Windows 向您显示各种自动完成选项。)

  1. Run the MySQL installer. Type something like the following command---make sure to include the period and backslash at the beginning---and press Enter.
  1. 运行 MySQL 安装程序。键入类似以下命令的内容---确保在开头包含句点和反斜杠---然后按 Enter。

.\mysql-installer-community-8.0.11.0.msi

.\mysql-installer-community-8.0.11.0.msi

Note: The idea of using an administrator command prompt came from John Geffe, in the link below, which was cited in the answer written by the original poster (user8425592):

注意:使用管理员命令提示符的想法来自 John Geffe,在下面的链接中,在原始海报 (user8425592) 写的答案中引用了:

https://bugs.mysql.com/bug.php?id=82004

Bug #82004 MySQL Installer freezes during "Please wait while Windows configures..." phase

[6 Feb 3:58] John Geffe

To get past this problem I had to run the .msi installer from an the Administrator command prompt. Hopefully this helps someone in the future.

[19 Apr 18:14] Jim McCauley

John Geffe: Thanks! Your note on installing as an administrator seems to have taken care of the problem.

https://bugs.mysql.com/bug.php?id=82004

错误 #82004 MySQL 安装程序在“请稍候 Windows 配置...”阶段冻结

[2 月 6 日 3:58] 约翰·格菲

为了解决这个问题,我必须从管理员命令提示符运行 .msi 安装程序。希望这对将来的人有所帮助。

[4 月 19 日 18:14] 吉姆·麦考利

约翰·格菲:谢谢!您关于以管理员身份安装的说明似乎已经解决了这个问题。

回答by rg_elite

this did the trick for me: https://ao.gl/mysql-community-server-msi-installer-hangs-on-windows-10/

这对我有用https: //ao.gl/mysql-community-server-msi-installer-hangs-on-windows-10/

1) run cmd (commandline) as Administrator 2) cd to your location that you downloaded the .MSI to 3) run the “msiexec” commandline tool with option “/i” as follows: 4) msiexec /i [replace with file name] 5) example: msiexec /i mysql-installer-community-5.7.20.0.msi

1) 以管理员身份运行 cmd (commandline) 2) cd 到您将 .MSI 下载到的位置 3) 运行带有选项“/i”的“msiexec”命令行工具,如下所示:4) msiexec /i [替换为文件名] 5) 示例:msiexec /i mysql-installer-community-5.7.20.0.msi

回答by Bogdan Uifalean

Another thing that worked for me was running the installer in compatibility modefor previous version of Windows. You can try that as well.

对我有用的另一件事是在以前版本的 Windows 的兼容模式下运行安装程序。你也可以试试。

enter image description here

在此处输入图片说明

回答by Ricky Nelson

Yes, I also got the same problem on my Windows 10. Followed the Powershell solution and it worked. Just repeat the above:

是的,我在我的 Windows 10 上也遇到了同样的问题。按照 Powershell 解决方案,它奏效了。只需重复以上内容:

  1. Click Starton bottom left corner

  2. Scroll down the application list until Windows Powershell

  3. Select Windows Powershellagain on sub-menu

  4. Type in cd(to change to your .msi folder)

  5. Type .\xxxxx.msi(this is the installer file name)

  1. 点击Start左下角

  2. 向下滚动应用程序列表,直到 Windows Powershell

  3. 选择Windows Powershell子菜单上再次

  4. 输入cd(以更改到您的 .msi 文件夹)

  5. 类型.\xxxxx.msi(这是安装程序文件名)

All good.

都好。

回答by Yuriy F

Go to the link you provided (the first one) and try installing MySql Workbench. That is the version that is commonly used, and one that I verified works in Windows 10. Here is the link: https://dev.mysql.com/downloads/workbench/

转到您提供的链接(第一个)并尝试安装 MySql Workbench。这是常用的版本,我验证过的版本在 Windows 10 中有效。这是链接:https: //dev.mysql.com/downloads/workbench/

Obviously, make sure you choose the right architecture, have the correct permissions to install software, and have enough space on your hard drive, or on the machine you are installing to.

显然,请确保您选择了正确的体系结构,具有安装软件的正确权限,并且在您的硬盘驱动器或要安装到的机器上有足够的空间。

回答by user3819354

Once you install the above package run the installer again and do the steps. You will be able to install the mysql-installer-community-5.7.21.0 for 64 bit windows 10

安装上述软件包后,再次运行安装程序并执行步骤。您将能够为 64 位 Windows 10 安装 mysql-installer-community-5.7.21.0

回答by FrqSalah

closing Windows Installer instances using 0 memory and CPU helps me to get past this problem.

使用 0 内存和 CPU 关闭 Windows Installer 实例帮助我解决了这个问题。

回答by Jagadeesh Sali

For me on Window-10machine, there was a problem with the "mysql-connector-net-8.0.11.msi". I was not able touninstallthis and hence all my subsequent efforts to install MySQL were failing. I did the following to overcome this issue.

对于我在Window-10机器上,“ mysql-connector-net-8.0.11.msi”存在问题。我无法卸载它,因此我随后安装 MySQL 的所有努力都失败了。我做了以下工作来克服这个问题。

  1. Re-installed "mysql-connector-net-8.0.11.msi" Get it hereand used the 'Repair' option
  2. Installed the "mysql-installer-web-community-8.0.11.0.msi"
  1. 重新安装“ mysql-connector-net-8.0.11.msi在此处获取并使用“修复”选项
  2. 安装了“ mysql-installer-web-community-8.0.11.0.msi

These two things solved my problem. Hope this helps.

这两件事解决了我的问题。希望这可以帮助。