Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot-mybatis-demo: Access denied for user 'root'@'localhost' (using password: YES) -> [Help 1]
关于在使用mybatis的generator插件自动导入实体类时,一切配置文件写好等待生成代码的时候:
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot-mybatis-demo: Access denied for user 'root'@'localhost' (using password: YES) -> [Help 1]
这个问题出来了进入apache的官网一看:MojoExecutionException
Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a problem in their configuration or the information they retrieved from the POM.
以上大致内容说这个异常不是由Maven核心本身生成的,而是由一个插件生成的。其间再次浏览诸多网站不得解。最后得一大神帮助。总结解决方案如下:
1、在mysql的安装目录下:mysql->dataDiector下,找到my.ini文件,在文件末尾加上:skip-grant-tables,然后保存并关闭文件
2、重新启动MySQL服务,是重新启动MySQL服务,并不是启动安装的SQLyog。
重启方法:
WIN+R,输入
services.msc
;找到你的mysql服务
点击重新启动该服务。