在连接方式后面添加?useUnicode=true&characterEncoding=UTF-8
alter user 'root'@'localhost' identified by '密码' password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by '密码';
flush privileges;
记得将密码替换为mysql 的密码。