MySQL忘记root密码

刚在Linux装完MySQL,然而登录的时候发现不知道root密码。更坑爹的是这个版本没有生成my.cnf的文件。所以不知道如何设置登录的时候跳过密码,so google 了一下,发现可以用安全模式登录修改。操作如下:

$mysqld_safe --skip-grant-tables
> mysql
> use mysql
> update user set authentication_string = PASSWORD('123456') where user = 'root';
flush privileges;

然后用exit,重启mysql,用刚才设置的密码重新登录。

$mysql -u root -p
> show database;

发现报错:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

> SET PASSWORD = PASSWORD('123456');

搞定。

Nexus Root Toolkit v2.1.9 解锁 root 刷TWRP

给大家推荐一个专门适配Nexus系列、Piexl系列的工具,非常方便。Nexus Root Toolkit v2.1.9

支持的机型有:

· Galaxy Nexus: GSM Models (both yakju and non-yakju builds)
· Galaxy Nexus: CDMA/LTE Verizon Models
· Galaxy Nexus: CDMA/LTE Sprint Models
· Nexus S: Worldwide, i9020t and i9023 Models
· Nexus S: 850MHz, i9020a Models
· Nexus S: Korea, m200 Models
· Nexus S 4G: d720 Models
· Nexus 7: Asus Tablet
· Nexus 7 3G: Asus Tablet
· Nexus 7 v2 (2013): Asus Tablet
· Nexus 7 v2 (2013) LTE: Asus Tablet
· Nexus 10: Samsung Tablet
· Nexus 4: LG Phone
· Nexus 5: LG Phone
· Nexus 5X: LG Phone
· Nexus 9: HTC Wifi Tablet
· Nexus 9: HTC LTE Tablet
· Nexus 6: Motorola Phone
· Nexus 6P: Huawei Phone
· Nexus Player: Google Device
· Nexus Pixel C: Google Tablet