最近在服务器上部署好的应用突然间连接不上mysql数据库,报错“ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server”

那么直接运行如下命令:

mysql -u root -p

弹出Enter password:输入您的数据库密码

链接到mysql数据库。

假如你的用户是root ,那么运行如下命令:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '您的数据库密码' WITH GRANT OPTION;

然后刷新一下权限

flush privileges;

大功告成,就可以在客户端连接mysql服务器了。

相关文章:

  • 2022-01-08
  • 2021-04-01
  • 2021-08-27
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
猜你喜欢
  • 2021-09-10
  • 2021-09-25
  • 2022-12-23
  • 2021-12-15
  • 2021-07-09
相关资源
相似解决方案