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

查看:87
本文介绍了在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 [警告] TIMESTAMP具有隐含的DEFAULT值 不推荐使用.请使用--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 password似乎可以正常工作.我能够成功使用需要密码的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天全站免登陆