重新设定mysql密码~,网上方法都是,这里选一个。
生活随笔
收集整理的這篇文章主要介紹了
重新设定mysql密码~,网上方法都是,这里选一个。
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
新開一個終端,對,就是要輸入jobs后沒有輸出的終端。
1終止MYSQL服務。
sudo killall mysqld
?2
特殊運行MYSQL
mysqld_safe --skip-grant-tables &
登錄
mysql -u root
設密碼
?
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set Password = PASSWORD('your new password') where User = 'root' ;
Query OK, 3 rows affected (0.02 sec)
Rows matched: 3? Changed: 3? Warnings: 0
mysql> quit
Bye
好了。
不要漏了sql語句后的一個;號?
?
轉載于:https://www.cnblogs.com/snowleung/archive/2011/06/29/2093763.html
總結
以上是生活随笔為你收集整理的重新设定mysql密码~,网上方法都是,这里选一个。的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Google 拼音会导致卡 Ctrl 键
- 下一篇: MYSQL[30]