目錄
- 1.開啟跳過權限驗證
- 2.重置密碼
1.開啟跳過權限驗證
vi /etc/my.cnf
[mysqld]
skip-grant-tables
/etc/init.d/mysqld restart
2.重置密碼
use mysql;
update user set authentication_string=password('123456') where user='root' and host='localhost';
flush privileges;
/etc/init.d/mysqld restart
vi /etc/my.cnf
[mysqld]
skip-grant-tables #delete
/etc/init.d/mysqld restart
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/91667.html
標籤:Linux
上一篇:二進制部署MySQL5.7
下一篇:計算機中存盤體系的設計
