开发者社区 问答 正文

刚安装完mysql 更改root的密码失败,提示信息如下

You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead

大概看得英语意思是没有权限什么的。。 网上找了答案 不过还是一头雾水

请哪位熟悉的告诉下小弟。 谢谢。

展开
收起
a123456678 2016-06-13 11:32:02 2862 分享 版权
1 条回答
写回答
取消 提交回答
  • mysqld_safe --user=mysql --skip-grant-tables --skip-networking

    这行的意思就是用安全模式启动mysql服务,跳过权限表,跳过网络连接

    这样就可以在本地手动修改root密码了

    2019-07-17 19:35:29
    赞同 展开评论