做一个项目需要连接在笔记本上的MySQL数据库,但是创建Connection的时候出现错误:

  这个异常的原因是数据库一开始是只允许localhost或者127.0.0.1访问的,不允许远程访问,需要修改访问权限。

  解决方法:

  MySQL | Java.sql.SQLException: null, message from server: "Host 'xxx.xxx.xxx.xxx' is not allowed to connect 异常解决

  flush privileges是为了将权限更新操作刷新到内存中,而不用下次启动时生效。

相关文章:

  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
猜你喜欢
  • 2021-10-01
  • 2021-12-11
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
相关资源
相似解决方案