Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 通过Hamachi(VPN)访问数据库_Mysql_Hamachi - Fatal编程技术网

Mysql 通过Hamachi(VPN)访问数据库

Mysql 通过Hamachi(VPN)访问数据库,mysql,hamachi,Mysql,Hamachi,我想从连接到我在本地单元(PC1)中创建的网络(Hamachi)的计算机(PC2)访问数据库。我的目标是通过一个php程序实现两个数据库之间的数据共享,该程序作为数据库查询系统,Hamachi作为我的VPN。我正在为MySQL GUI使用SQLyog 这是我的计划图: DB1 <<-------- --------->> DB2 1. PC1 is the owner of the VPN created via Hamachi |

我想从连接到我在本地单元(PC1)中创建的网络(Hamachi)的计算机(PC2)访问数据库。我的目标是通过一个php程序实现两个数据库之间的数据共享,该程序作为数据库查询系统,Hamachi作为我的VPN。我正在为MySQL GUI使用SQLyog

这是我的计划图:

  DB1 <<--------  --------->> DB2              1. PC1 is the owner of the VPN created via Hamachi
   |           |  |            |               2. PC2 joins the PC1 in the VPN
   |       Data Sharing        |               3. Hamachi assigns IP addresses to each PC
   |           |  |            |               4. PC1 should be able to manage DB2 & vice versa
  PC1----- + HAMACHI < ------ PC2

感谢Kris提供的链接,我找到了这个问题的解决方案。基本上,我只需要在Windows防火墙的受保护连接中取消选中Hamachi。(这应适用于连接到VPN的所有PC)

当您尝试访问远程数据库时,会收到什么错误消息?这一定是防火墙配置有问题。您需要在超级用户频道上询问这些问题。顺便说一句,检查这个链接@Shadow我已经更新了帖子。我在SQLYG中得到的错误消息是“错误号2003无法连接到'hamachi_ip'(10060)@Kris上的MySQL服务器。我将尝试检查链接。什么是“超级用户频道”?请访问此处
// Error message in the SQLyog:
Error No. 2003
Can't connect to MySQL server on 'hamachi_ip' (10060)