mysql 8遇到的坑坑

  1. 我使用mybaits_generator插件的时候,尝试连接mysql,一直都是失败的,
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate, Client does not support authentication protocol requested by server; consider upgrading MySQL client  

但driverLocation,driverClassName以及url, username, password都配置没有问题,并且通过navicat连接并操作数据库都是正常的,我使用JDK 7, driver: mysql-connector-5.1.6 最终解决方案是
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'