maven集成mybatis-generator异常:Access denied for user 'root'@'localhost' (using password: YES)

1.异常

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project pcs: Access denied for user 'root'@'localhost' (using password: YES) -> [Help 1]

2.解决方案

(1)mysql安装目录下找到my.ini,打开my.ini文件,在[mysqld]下添加  skip-grant-tables 并保存

(2)任务管理器重启 mysql服务

(3)打开命令行窗口 ,执行 mysql –uroot –p(需配置mysql环境) 直接回车即可

(4)执行 update mysql.user set authentication_string='123456' where user='root';

(5)回到项目中修改配置为新的密码!

猜你喜欢

转载自blog.csdn.net/qq_36940806/article/details/104921744