首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁MySQL:忘记root密码”︁的源代码
←
MySQL:忘记root密码
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
首先停止mysql <source lang="bash"> service mysql stop </source> 然后以安全模式启动mysql在后台运行: <source lang="bash"> mysqld_safe --skip-grant-tables & </source> 然后就可以以root登录到mysql服务器上 <source lang="bash"> mysql -u root use mysql </source> 修改MySQL的root密码: <source lang="sql"> update user set password=PASSWORD('123456') where User='root'; #MySQL 5.7 update user set authentication_string=password('123456') where user='root'; flush privileges; </source> [[Category:Database]]
返回
MySQL:忘记root密码
。