Good day. I am trying to connect with a PHP script (on hosting) to a computer with SQL Server. The problem is that the PC network through the router via ADSL go to the Internet under a single static IP. How in this case to make connection?

    2 answers 2

    It is necessary to configure the so-called port forwarding on the router. In DLink, for example, this section is called Port Mapping. The port and the computer ip on the internal network are indicated, where the connection needs to be transferred. MySQL has default port 3306

    • Those. for example, if I set up a router for forwarding port 1433 for PC1 with a lok address, for example,, then if I call from outside to address,1433 - will this be PC1? - Afipsky pm
    • Yes exactly. However, the ports do not have to be the same. You can, for example, set up forwarding from to, from to, etc. - Ilya Pirogov
    • yes, just like that - Enpire

    Take an external IP for a computer with a server or reconfigure the router

    • External IP all computers one. - Afipsky
    • And I say, you need to take a separate external IP for the server =) Many providers have this service, often paid. Just incl. for your purposes. - Sh4dow