简体   繁体   English

从远程服务器连接到MySQL的本地实例

[英]Connection to Local Instance of MySQL from Remote Server

I have an IRC bot that collects some info and writes that info to a MySql DB. 我有一个IRC机器人,它收集一些信息并将该信息写入MySql DB。 I run the IRC bot locally, and also an XAMPP server (latest version) for the MySQL locally (my PC). 我在本地运行IRC bot,也在本地(我的PC)上运行MySQL的XAMPP服务器(最新版本)。

I want to write this data to a remote mysql db as well. 我也想将此数据写入远程mysql数据库。 Unfortunately my FatCow hosting will not allow me to connect to my DB remotely. 不幸的是,我的FatCow托管不允许我远程连接到数据库。

So, I am trying to connect to the XAMPP setup on my local PC from a php page running on my FatCow hosting, but I can't figure it out. 因此,我试图从运行在FatCow主机上的php页面连接到本地PC上的XAMPP设置,但是我无法弄清楚。

I have changed the bind address to 0.0.0.0 ... I also have forwarded port 3306 on my firewall ... but I can't seem to connect. 我已将绑定地址更改为0.0.0.0 ...我还转发了防火墙上的端口3306 ...但是我似乎无法连接。

I get this error: Message: mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111 我收到此错误:消息:mysql_connect():在“读取初始通信数据包”时与MySQL服务器的连接断开,系统错误:111

Thx for the help... I am a bit unfamiliar with this type of thing. 感谢您的帮助...我对这种类型的东西有点不熟悉。 Hand holding may be necessary. 可能需要手握。

Remote database connection is not supported in their shared hosting platform. 他们的共享托管平台不支持远程数据库连接。 So, it will not work. 因此,它将无法正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM