mysqld 未知选项 '--initialize' [英] mysqld unknown option '--initialize'

查看:445
本文介绍了mysqld 未知选项 '--initialize'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows Server 2012 上安装 MySQL 5.6.在 Linux 中,这将花费我 5 秒钟,但我已经搞砸了几个小时,但我仍然无法登录.

I am trying to install MySQL 5.6 on Windows Server 2012. In Linux this would have taken me 5 seconds, but I've been messing with this for hours now and I still can't log in.

我认为安装程序在配置阶段搞砸了,所以我删除了数据目录并尝试重新创建它:

I think the installer messed up at the configuration stage so I deleted the data directory and tried to recreate it:

bin\mysqld --initialize-insecure

但 MySQL 中止:

But MySQL aborts with:

[ERROR] bin\mysqld: unknown option '--initialize-insecure'

如果我使用 --initialize 也会发生同样的情况.

The same happens if I use --initialize.

日志中还有另一个错误:

There's another error earlier in the log:

[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it

但显然解决这个问题的方法是运行 mysqld --initialize.

But apparently the solution to this is to run mysqld --initialize.

为什么mysqld不识别它自己的--initialize选项?

Why doesn't mysqld recognise it's own --initialize option?

推荐答案

答案可以在 MySQL 文档中找到:

The answer can be found in the MySQL documentation:

在 MySQL 5.7.7 之前,Windows 发行版在 mysql 数据库中包含一个带有预建表的数据目录

Prior to MySQL 5.7.7, Windows distributions include a data directory with prebuilt tables in the mysql database

所以对于 MySQL 5.6,没有 --initialize 选项.

So for MySQL 5.6, there is no --initialize option.

这篇关于mysqld 未知选项 '--initialize'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆