登入数据库更密码 # cat /var/log/mysqld.log | grep "password" 2021-06-22T08:17:17.639433Z 1 [Note] A temporary password is generated for root@localhost: psZ<zHdgI9Qq # mysql -uroot -p Enter password: mysql> mysql> ALTER USER 'root'@'localhost' identified by 'Uplooking_123'; Query OK, 0 rows affected (0.01 sec)