1、找到 my.ini
2、在 [mysqld] 找到 default_authentication_plugin
修改 default_authentication_plugin 为 mysql_native_password
#default_authentication_plugin=caching_sha2_password
default_authentication_plugin=mysql_native_password
3、在 [mysqld] 添加
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
最后个改你的帐号的密码。以mysql_native_password 格式修改
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘你的密码’;