已知密码情况下
1 2 3
| mysqladmin -uroot -p password 123456
|
忘记密码修改
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| systemctl stop mysqld.service
mysqld_safe --skip-grant-tables --skip-networking &
--skip-grant-tables --skip-networking
mysql
flush privileges; alter user root@'localhost' identified by '1'; exit
pkill mysqld systemctl restart mysqld.service
mysql -uroot -p1
|
