centos7下 mysql5.7 忘记密码重置
来源:互联网 发布:淘宝网实木家具 编辑:程序博客网 时间:2024/06/01 03:57
MySQL 5.7 开始 数据库中的user 表中已经将password 字段更改为authentication_string 所以更改密码 直接使用 update mysql.user set authentication_string=password("123456") where user="root";
完整的修改数据库密码的操作
1. vim /etc/my.cnf 加入skip-grant-tables
2.重启mysql systemctl restart mysqld
3.终端输入mysql 直接登录到数据库 use mysql ;
4.update mysql.user set authentication_string=password("123456") where user="root";
5.编辑my.cnf文件删掉skip-grant-tables 这一行,然后重启MySQL,/etc/init.d/mysqld restart,否则MySQL仍能免密码登录
6.mysql -uroot -p
接下来MySQL就可以正常运行了。
阅读全文
1 0
- centos7下 mysql5.7 忘记密码重置
- [MySQL] CentOS7 mysql5.7 忘记root密码 重置root密码 1045
- CentOS7下mysql5.7忘记root密码的处理方法
- CentOS7下mysql5.7忘记root密码的处理方法
- mysql5.7忘记密码(centos7.3)
- centos7忘记root密码重置
- Linux下MySQL5.6.15-忘记root密码-重置
- Linux下MySQL5.6.15-忘记root密码-重置
- MYSQL密码忘记了怎么办?MYSQL5.7重置root密码
- Centos7忘记密码重置root密码
- Centos 7 下重置mysql5.7密码
- mac 下 mysql5.7 密码 重置
- ubuntu 下mysql5.7密码重置
- mysql5.5忘记密码重置方法
- CentOS7下安装mysql5.7过程,及忘记密码的处理
- centos7忘记root密码重置解决方法
- Centos7忘记root密码时重置
- Mac下MySQL5.7忘记root密码
- gcc编译选项
- [LeetCode]160. Intersection of Two Linked Lists
- 机器人运动范围
- Slidr使用详解,Android手指滑动返回Activity
- CSS写作注意事项
- centos7下 mysql5.7 忘记密码重置
- React-navigation 官方文档中文翻译(二) Nesting Navigators
- http状态码:405 问题
- Android 混淆文件配置
- 用C语言封装OC对象(耐心阅读,非常重要)
- 详解ASP.NET 页面之间传值的几种方式
- YOLO9000: Better, Faster, Stronger
- leetcode 59. Spiral Matrix II
- Android最流行开源工具库