在 MySQL 5.6 中重置 ROOT 密码 [英] Resetting ROOT password in MySQL 5.6

查看:37
本文介绍了在 MySQL 5.6 中重置 ROOT 密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在按照这些说明来重置root 在 Windows 7 笔记本电脑上本地安装 MySQL 5.6 的密码.

I have been following these instructions for resetting root password for local installation of MySQL 5.6 on Windows 7 laptop.

我停止了服务,创建了init-file,并运行了以下命令(以管理员身份):

I stopped the service, created init-file, and ran the following command (as Administrator):

"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" --init-file=C:\\MySQL-misc\\mysql-init.txt

我收到以下警告:

2014-02-08 15:44:10 0 [警告] 带有隐式默认值的时间戳已弃用.请使用 --explicit_defaults_for_timestamp 服务器选项(有关详细信息,请参阅文档).

2014-02-08 15:44:10 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

由于这是一个警告,我不确定是否需要修复任何内容,然后再次重做该过程.

Since it's a warning I'm not sure whether I need to fix anything and then redo the process again.

当前命令窗口仍然打开并且不接受任何输入.我应该强制关闭它还是我可以做些什么来优雅地完成这个过程?

Currently the command window is still on and does not accept any input. Should I force-close it or is there anything I can do to complete the process gracefully?

更新

我关闭了命令窗口并尝试重新启动服务.有错误.

I killed the Command window and tried to restart the service. Got an error.

重新启动 Windows,服务自动启动. root 密码 似乎有效.成功使用Workbench各种需要密码的功能.

Restarted Windows and the service automatically started. The new root password seems to work. I was successfully able to use various functions of Workbench that require the password.

所以,警告确实只是一个警告.

So, the warning was indeed just a warning.

推荐答案

问题已经解决.

如我的问题所述,我遵循了MySQL手册中的说明.

As stated in my question I followed instructions from MySQL manual.

过程没有像描述的那样完全(这就是我发布原始帖子的原因),但它仍然有效(请参阅我帖子中的更新部分).

The process did not go exactly as described (and this was the reason for my original post) but it worked nevertheless (see UPDATE section in my post).

这篇关于在 MySQL 5.6 中重置 ROOT 密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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