mysql8.0重置密码
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                mysql8.0重置密码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                重置mysql root
1、打開配置文件/etc/my.cnf,添加一行
skip-grant-tables
2、重啟 service mysqld restart 或 systemctl restart mysqld
3、mysql -uroot -p進入
3.1 select host, user, authentication_string, plugin from user;
3.2? root 清空密碼?update user set authentication_string='' where user='root';
3.3 修改密碼 字母(大小寫)數字特殊符
alter user 'root'@'localhost' identified by '你的新密碼';
1. 使用 caching_sha2_password 插件
修改用戶密碼,并且用插件生成。
ALTER USER 'user'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';
2、修改 /etc/mysql/my.cnf
[mysqld]
default_authentication_plugin= mysql_native_password
3、修改密碼
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
總結
以上是生活随笔為你收集整理的mysql8.0重置密码的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: [管理员手册](五)Ubuntu des
- 下一篇: 图嵌入方法基础学习之Node2vec
