mysql开源内库_将内裤穿在外面的男人(mysql)
superman 的好處是可以為所欲為,不僅可以修改自己的密碼,還能給別人授權,修改別人的密碼。
1、修改自己 的密碼
首先要先登錄mysql,
然后: mysqladmin ? -u ? root ? -p ? password ? "123445"
還有一種方法: 通過mysql.user
use mysql;
update user set authentication_string=password("123456"') where user='root';
但是上面不起作用。
use mysql;
update user set authentication_string="123456" where user='root';
flush privileges;
這下好,直接導致原密碼不管用,新設置的密碼:123456 也不管用
靠,開始用絕招。
mysqld --shared-memory --skip-grant-tables(我已經設置了環境變量,所以不用? cd .......)
此時會hang住,重新打開cmd
mysql -u root -p
直接回車,不用輸入密碼
媽呀,終于進來了。
趕緊改個密碼
update mysql.user set authentication_string="" where user='root';
flush privileges;
直接給它來了個無密碼
終端推出 exit;
服務端直接關閉(還不知道其他方法)
重新登錄
以管理員身份打開cmd 然后
net start mysql
mysql -h 127.0.0.1 -u root -p
直接回車,進入了,我的天,給自己煩死了。
mysql 8.0.16 版本
mysqladmin -u root -p password "123456" ? 這種方法可以
alter user 'root'@'localhost' identified by "123456" ? 這種方法也可以
但是
set password = password("123456")
以及
use mysql
update user set authentication_string=password("123456") where user="root"
這種兩種方法總是報語法錯誤,感覺好像和password 有關。(有沒有人指點下?)
未完待續
總結
以上是生活随笔為你收集整理的mysql开源内库_将内裤穿在外面的男人(mysql)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql jdbc连接 优化_java
- 下一篇: mybatis mysql Dao_Da