mysql忘记密码如何重置密码
生活随笔
收集整理的這篇文章主要介紹了
mysql忘记密码如何重置密码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
當數據庫root密碼忘記或者安裝數據庫時默認密碼太繁瑣。推薦使用如下方法
第一步:找到mysql的配置文件 my.cnf ,mysqld添加 代碼?--skip-grant-tables
--skip-grant-tables第二步:登錄MySQL?
mysql -uroot -p第三步:執行一下語句;update mysql.user set authentication_string='1234' where user='root' and host='%';
update mysql.user set authentication_string='1234' where user='root' and host='%';?第四步:刷新??flush privileges
flush privileges最后:重啟服務??service mysqld restart
service mysqld restart搞定
分享時為了更好的節約大家時間。愛分享。愛交流
總結
以上是生活随笔為你收集整理的mysql忘记密码如何重置密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 卸载mysql服务器_彻底卸载MySQL
- 下一篇: iWebOffice2006