使用Workbench 无法远程连接Mysql服务器提示如下错误:

MySQL 远程连接问题 (Windows Server)

 

查找原因:

MySQL 远程连接问题 (Windows Server)

显示只能localhost 访问。

解决方法:修改授权远程访问

create user 'root'@'%' identified by 'my_password';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;

%代表通配,也可换成IP地址。

注意在8.0版本必须分成三条语句来写,创建账户和授权被分开了。

 

再次连接仍然报错:

MySQL 远程连接问题 (Windows Server)

原因:Windows 防火墙导致

解决方法:防火墙高级设置里面新增入站规则,填入MySQL的端口地址。

MySQL 远程连接问题 (Windows Server)

 

相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2021-05-29
  • 2021-11-23
  • 2022-12-23
  • 2022-02-24
  • 2022-02-04
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-04-21
  • 2021-05-23
  • 2022-03-08
  • 2021-10-31
相关资源
相似解决方案