重新设定mysql密码~,网上方法都是,这里选一个。
新開一個終端,對,就是要輸入jobs后沒有輸出的終端。
1終止MYSQL服務(wù)。
sudo killall mysqld
?2
特殊運行MYSQL
mysqld_safe --skip-grant-tables &
登錄
mysql -u root
設(shè)密碼
?
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語句后的一個;號?
?
轉(zhuǎn)載于:https://www.cnblogs.com/snowleung/archive/2011/06/29/2093763.html
總結(jié)
以上是生活随笔為你收集整理的重新设定mysql密码~,网上方法都是,这里选一个。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Google 拼音会导致卡 Ctrl 键
- 下一篇: MYSQL[30]