【问题标题】:MYSQL server fails while installingMYSQL 服务器在安装时失败
【发布时间】:2017-09-11 09:23:15
【问题描述】:

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

这是日志:

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

提供的截图(在这个安装过程中我的防火墙和防御者被关闭了)

【问题讨论】:

    标签: mysql windows installation failed-installation


    【解决方案1】:

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

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

    my.ini 文件中注释的变量

    ... # 指示 InnoDB Cluster 是如何配置为(Classic、Sandbox、Master 或 Slave)的。 #innodbclustertypeselection=0.0 # 指示 InnoDB Cluster 是/将如何命名的。 #innodbclustername=0.0 # 指示 InnoDB 集群沙箱将拥有多少个实例。 #innodbclusterinstances=0.0 # 保存 InnoDB 集群用户名。 #innodbclusterusername=0.0 # 表示 InnoDB 集群 URI。 #innodbclusteruri=0.0 # 表示 InnoDB 集群端口。 #innodbclusterport=0.0

    希望对你有帮助

    【讨论】:

    • 为我工作。奇怪的事情:我在本地开发机器(Windows 7)上使用了相同的安装程序,最后在 Windows Server 2008 R2 上使用了相同的安装程序 - Win 7 上没有问题,2008 R2 上出现上述问题......我删除了提到的值,清除了数据目录并运行mysqld --initialize --console - mysql终于能够启动了。
    • ps.:除了“默认”数据目录之外,安装程序也是完全可靠的。在向导中更改路径时,my.ini 中的多个路径一直指向默认路径,这将不起作用。
    【解决方案2】:

    这似乎是 MySQL 安装程序中的一个错误,根据bug report

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

    您必须按照 David Aldana 的解决方案从配置文件中删除 innodbcluster* 选项以及删除 plugin_load 选项设置为0.0

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        猜你喜欢
        • 2018-01-08
        • 1970-01-01
        • 2023-03-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多