登录mysql mysql -u root -p 输入登录密码 使用mysql数据库 USE mysql 修改密码 ALTER USER ‘test’@‘localhost’ IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY ‘新密码’; 验证是否修改成功 mysql -u test -p