can't connect to MySQL database using external ip address

非 Y 不嫁゛ 提交于 2019-12-06 06:01:37

If http://www.whatismyip.com/ and the address you get from ipconfig are different, that means you're using a local router (probably the one you use to connect to the internet) that network address translation. In other words, you have a local network (in your house or your fav internet cafe) that has private-network addresses like 192.168.0.1 or 10.0.0.1.

MySQL usually uses listens on port 3306 for inbound connection requests. But, when you try to connect via your public ip address (the What's My IP address) your network provider sends the request to your router. The router notices port 3306, but it probably doesn't know what to do with it. So it silently ignores the request. The software you're using to make the connection then times out. This is good. Crackers try to connect to ports like that to see if they can get into your machine.

So, to get this to work you need to configure your router to pass incoming TCP requests to port 3306 through to the machine that runs your MySQL server. It probably has a configuration screen to do this. It will work on the router you own. It won't work on the coffee shop router.

If you're not sure what "port" means, or why you get a different IP address from ipconfig and from http://www.whatismyip.com/, with respect you probably need to learn quite a bit more about internet technology before you should attempt this kind of thing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!