mysql -u root -p
# 密码
USE mysql
# 修改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY '新密码';
flush privileges;
mysql -u test