mysql8忘记密码后重置密码
生活随笔
收集整理的這篇文章主要介紹了
mysql8忘记密码后重置密码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、cmd窗口關掉服務(8表示mysql版本)
net stop mysql82、無密碼啟動mysql服務
mysqld --console --skip-grant-tables --shared-memory
3、另開一個cmd窗口,空密碼登錄mysql
4、用sql命令把root密碼設置為空
update mysql.user set authentication_string='' where user='root';5、刷新權限,密碼就重置為空了
flush privileges;6、我們可以查看下修改好的密碼
select host,user,plugin,authentication_string from mysql.user;總結
以上是生活随笔為你收集整理的mysql8忘记密码后重置密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux进程通信之信号量
- 下一篇: 卸载mysql服务器_彻底卸载MySQL