Q: 刚搭建的springboot 项目,链接的是mysql,启动报错:。。。。 message from server: "Host 'windows10.microdone.cn' is not allowed to connect to this MySQL server" 

A: 我链接的是本机的mysql,采用改表法,在Navicate里面进入mysql库修改user表中user=root的host为%,

  或者命令 mysql> use mysql

                  mysql> update user set host = '%' where user = 'root';

                  mysql> flush privileges;

再启动就行了。

有个疑问:我的ip截图

      常见错误汇总

我连的是我手机的热点,.properties 文件中配置的

#spring.datasource.url=jdbc:mysql://172.31.XXX.X:3306/firstspring
spring.datasource.url=jdbc:mysql://192.168.43.XXX:3306/firstspring

都能正常启动链接数据库,为什么呢?

 

Q: 启动报 spring boot jpa-java.lang.IllegalArgumentException: Not a managed type

A: JPA 实体类没有被扫描到,在实体类上加@Entity 即可

 

相关文章:

  • 2019-03-26
  • 2021-09-27
  • 2021-11-20
  • 2021-11-01
  • 2021-12-18
  • 2021-10-04
  • 2021-11-05
  • 2021-11-03
猜你喜欢
  • 2018-06-11
  • 2021-11-15
  • 2021-08-02
  • 2021-05-04
  • 2021-08-13
  • 2021-09-14
相关资源
相似解决方案