linux忘記mysql5.7的root用戶密碼

1.跳過登錄mysql的驗證 vi /etc/my.cnf 在[mysqld]段中加入 skip-grant-tables 保存並退出 2.重啓服務 service mysqld restart 3.修改密碼並清除緩存 mysql -uroot -p 密碼直接回車就好 use mysql; update user set authentication_string=password("your p
相關文章
相關標籤/搜索