MYSQL服务器在安装时失败

MYSQL服务器在安装时失败,mysql,windows,installation,failed-installation,Mysql,Windows,Installation,Failed Installation,将登录更改为本地服务,然后启动服务器时的屏幕截图: 以下是日志: Beginning configuration step: Stopping Server [if necessary] Ended configuration step: Stopping Server [if necessary] Beginning configuration step: Writing configuration file Ended configuration step: Writing config

将登录更改为本地服务,然后启动服务器时的屏幕截图:

以下是日志:

Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]

Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file

Beginning configuration step: Updating firewall
Adding firewall rule for MySQL57 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall

Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]

Beginning configuration step: Initializing Database [if necessary]
Deleting Data folder shipped
Attempting to run MySQL Server with --Initialize-insecure
Running process: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console
Waiting for the server stops: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console
2017-04-15T06:26:24.188171Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-04-15T06:26:24.188171Z 0 [Warning] '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.
2017-04-15T06:26:29.144031Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-04-15T06:26:29.946540Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-04-15T06:26:30.159610Z 0 [ERROR] unknown variable 'innodbclustertypeselection=0.0'
2017-04-15T06:26:30.160610Z 0 [ERROR] Aborting

The attempt to initialize the database Failed
Ended configuration step: Initializing Database [if necessary]

Beginning configuration step: Starting Server
Starting MySQL as a service

提供的屏幕截图(在此安装过程中,我的防火墙和defender已关闭)

考虑到您在Windows上工作,请尝试以下操作

如果不需要群集安装,则必须从my.ini文件中删除或注释群集配置变量,该文件通常位于C:\ProgramData\MySQL\MySQL Server 5.7\my.ini中

在my.ini文件中注释的变量

... # Indicates how is the InnoDB Cluster configured as (Classic, Sandbox, Master or Slave). #innodbclustertypeselection=0.0 # Indicates how is the InnoDB Cluster is/will be named. #innodbclustername=0.0 # Indicates how many instances will the InnoDB cluster sandbox will have. #innodbclusterinstances=0.0 # Holds the InnoDB Cluster Username. #innodbclusterusername=0.0 # Indicates the InnoDB Cluster URI. #innodbclusteruri=0.0 # Indicates the InnoDB Cluster Port. #innodbclusterport=0.0 ... #指示InnoDB群集如何配置为(经典、沙盒、主或从)。 #innodbclustertypeselection=0.0 #指示InnoDB群集的命名方式。 #innodbclustername=0.0 #指示InnoDB群集沙箱将有多少实例。 #innodbclusterinstances=0.0 #保存InnoDB集群用户名。 #innodbclusterusername=0.0 #指示InnoDB群集URI。 #innodbclusteruri=0.0 #指示InnoDB群集端口。 #innodbclusterport=0.0
我希望这会有所帮助

根据本文,这似乎是MySQL安装程序中的一个bug

如果您正在执行版本5.7.11+的新安装,您将遇到此问题,因为安装程序附带的配置文件具有版本5.7不支持的选项。我在安装5.7.18时遇到了这个bug,这是今天的最新版本

您必须遵循David Aldana的解决方案,从配置文件中删除
innodbcluster*
选项,并删除
plugin\u加载
选项,该选项设置为
0.0

将MySQL安装程序升级至最新版本。在版本1.4.20.0中,错误已修复。 我希望这对某人有帮助


为我工作。奇怪的是:我在本地开发机器(Windows 7)上使用了相同的安装程序,最后在Windows Server 2008 R2上使用了相同的安装程序-Win 7上没有问题,上面的问题在2008 R2上。。。。我删除了上面提到的值,清除了数据目录,然后运行了
mysqld--initialize--console
——最后mysql能够启动了。ps:除了“默认”数据目录之外,安装程序也是网络可靠的。在wizzard中更改路径时,my.ini中的多个路径始终指向默认路径,这将不起作用。