访问数据库时报错信息

Access denied for user 'root'@'%' to database 'netai_test'

原因:这是由于创建数据库后没有对用户授权,使用户可以访问数据库的原因。本地访问当然可以。

 

通过对用户授权就可以了。

grant all on (数据库名).* to '(用户)'@'%' identified by '(用户密码)' with grant option; 

 

相关文章:

  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
猜你喜欢
  • 2021-09-25
  • 2021-07-29
  • 2021-12-01
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
相关资源
相似解决方案