Linux-mysql忘记root密码
来源:互联网 发布:怎么提升自己 知乎 编辑:程序博客网 时间:2024/05/22 13:56
长时间未用装有mysql的虚拟机,最近用的时候,忘记mysql的root密码了,然后找了一下解决方案:
1 . 编辑配置文件my.cnf
[mysqld]
….
skip-grant-tables
2 . 重新启动mysql服务
service mysql restart
3 . 登录mysql修改root密码
#mysqlmysql>use mysql;mysql> update user set password = password('newpassword') where user = 'root' ; #修改newpassword为你自己设置的密码mysql>flush privileges ; mysql>quit
4 . 恢复配置文件my.cnf
删除之前配置的skip-grant-tables
5 . 再次重新启动mysql即可
0 0
- linux mysql 忘记root密码
- linux mysql 忘记root密码
- Linux-mysql忘记root密码
- linux 忘记mysql root密码
- linux mysql root 忘记密码
- linux 下 mysql root 密码忘记解决办法
- linux中mysql的root密码忘记
- linux下mysql的root密码忘记
- Linux MySQL 忘记root密码的处理
- linux上mysql root密码忘记解决办法
- linux(centos)下mysql忘记root密码
- linux下忘记mysql root密码解决办法
- linux下mysql的root密码忘记
- linux下忘记mysql root密码解决办法
- Linux下MySQL忘记root密码 1.2
- Linux下忘记mysql的root密码
- Linux下MySQL忘记root密码怎么办
- Suse linux 下mysql忘记root密码
- 浅谈Android Fragment嵌套使用存在的一些BUG以及解决方法
- Swap Nodes in Pairs
- ecshop编辑器fckeditor换百度ueditor编辑器教程
- 多维尺度分析 MDS
- UIResponder - 2
- Linux-mysql忘记root密码
- cocos studio应用案例
- ZOJ 3872 Beauty of Array
- Linux slab 分配器剖析
- 『iOS/Obj-C』V2EX iOS 客户端源码读书笔记
- 谈谈Android Material Design 中的Tint(着色)
- Unity 4.5 升级到 5.1.2相关
- topcoder intoTheMatrix
- matlab笔记