问题表现
如下初始化命令均无反应
代码语言:powershell复制--initialize-insecure
--initialize
--initialize --console
执行结果如下:
代码语言:powershell复制PS D:mysql-5.7.41-winx64> .binmysqld --initialize --console
PS D:mysql-5.7.41-winx64>
原因及解决办法
原因
缺少了Microsoft Visual C Redistributable
软件包
如果下载的不是.zip版本,而是.msi版本,就可以看到缺少软件包的提示了。
如下是mysql 5.7.44
的提示,需要 VC 2019 Redistributable
:
解决办法
下载需要的Visual C Redistributable软件包,然后重新使用mysqld --initialize
初始化
Microsoft Visual C Redistributable 2005-2019 各版本下载链接(2019/2017/2015/2013/2012/2010/2008/2005)
Microsoft Visual C Redistributable 2005-2019 下载链接
Microsoft Visual C Redistributable 2019
- x86: https://aka.ms/vs/16/release/VC_redist.x86.exe
- x64: https://aka.ms/vs/16/release/VC_redist.x64.exe
Microsoft Visual C Redistributable 2017
x86: https://go.microsoft.com/fwlink/?LinkId=746571
x64: https://go.microsoft.com/fwlink/?LinkId=746572
Microsoft Visual C Redistributable 2015
x86 x64: https://www.microsoft.com/en-pk/download/details.aspx?id=48145
x86 x64 update3: https://www.microsoft.com/en-us/download/details.aspx?id=53587
Microsoft Visual C Redistributable 2013
x86 x64 in all Language: https://support.microsoft.com/en-us/help/4032938/update-for-visual-c-2013-redistributable-package
Microsoft Visual C Redistributable 2012
x86 x64 in all Language: https://my.visualstudio.com/Downloads?pid=1452
Microsoft Visual C Redistributable 2010
x86-sp1: https://www.microsoft.com/en-pk/download/details.aspx?id=8328
x86-sp1-MFC-sec-update: https://www.microsoft.com/en-us/download/details.aspx?id=26999
Microsoft Visual C Redistributable 2008
x86: https://www.microsoft.com/en-us/download/details.aspx?id=29
x64: https://www.microsoft.com/en-us/download/details.aspx?id=15336
x86 x64-MFC-update: https://www.microsoft.com/en-us/download/details.aspx?id=26368
Microsoft Visual C Redistributable 2005
x86: https://www.microsoft.com/en-pk/download/details.aspx?id=3387
x64: https://www.microsoft.com/en-US/Download/confirmation.aspx?id=21254