登录服务器
mysql -h 192.168.95.149 -u root -p'123456' -P 3306
use mysql
5.6版本
UPDATE user SET Password = PASSWORD('Ultrapower2021!') WHERE user = 'root';
5.7版本
UPDATE user SET authentication_string = password ( 'Ultrapower2021!' ) WHERE User = 'root' ;
然后
flush privileges;