php - Connect to MySQL database over public ip address? -


i'm using xampp , have been able connect phone host using hosts static ip 192.168.0.x when try connect database though public ip address fails.

http://192.168.0.x/testdatabase/ works http://xx.xx.xxx.xx/testdatabase/ (my public ip) doesn't, have enabled port forwarding on port 3306 hosts static ip still fails , have tried adding :3306 end of ip.

how can connect sever through public ip address?

i'd use ssh tunneling.

tunnel server using ssh, local client, connect localhost on whatever port you've set tunnel mysql.

on windows can use putty that. or ssh on macos / linux.

i won't make full tuto on how setup ssh tunnel you'll find tons of sources on web.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -