Connect to MySQL server
-
Hallo, I cannot connect to MySQL database from PC outside home network. I created client aplication in c++ to editing data in MySQL database. We have 2 PC at home. Both PC has the same TCP/IP address like xxx.xx.xx.xx. PC with MySQL server has IPv4 address 10.10.11.93. I tried to type xxx.xx.xx.xx/10.10.11.93 but error is occurred: 2005: unknown MySQL server host "xxx.xx.xx.xx/10.10.11.93" ( 11004). I can connect to the database from second PC at home wrighting the name of PC with MySQL server. What I have to write to connect from outside? Thanks.
-
Hallo, I cannot connect to MySQL database from PC outside home network. I created client aplication in c++ to editing data in MySQL database. We have 2 PC at home. Both PC has the same TCP/IP address like xxx.xx.xx.xx. PC with MySQL server has IPv4 address 10.10.11.93. I tried to type xxx.xx.xx.xx/10.10.11.93 but error is occurred: 2005: unknown MySQL server host "xxx.xx.xx.xx/10.10.11.93" ( 11004). I can connect to the database from second PC at home wrighting the name of PC with MySQL server. What I have to write to connect from outside? Thanks.
1.fcb1913 wrote:
What I have to write to connect from outside?
In a default-installation, it's not possible to make a connection to the server from the outside world. The idea behind that being that you can install a server, without having to worry about me poking at the password over the internet. You'll have to check the local firewall, and, if it's a home-PC, your router. If that last is the case, you can go to this site[^], and click on "More about you" on the left; it'll load a new page, hopefully with a hostname. If not, you can still connect using the IP-adress, given that the server is configured and reachable.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
1.fcb1913 wrote:
What I have to write to connect from outside?
In a default-installation, it's not possible to make a connection to the server from the outside world. The idea behind that being that you can install a server, without having to worry about me poking at the password over the internet. You'll have to check the local firewall, and, if it's a home-PC, your router. If that last is the case, you can go to this site[^], and click on "More about you" on the left; it'll load a new page, hopefully with a hostname. If not, you can still connect using the IP-adress, given that the server is configured and reachable.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
On MySQL server is enabled TCP/IP networking, firewall exception for port and enabled root access from remoute machines. I know my TCP/IP - is static. If I'm trying to connect from outside home network, a firewall don't notice anything. I can connect from another PC at home network. What I have to do to connect from outside?
-
On MySQL server is enabled TCP/IP networking, firewall exception for port and enabled root access from remoute machines. I know my TCP/IP - is static. If I'm trying to connect from outside home network, a firewall don't notice anything. I can connect from another PC at home network. What I have to do to connect from outside?
1.fcb1913 wrote:
What I have to do to connect from outside?
I suggest you run a little webserver, and use that to verify whether you can connect. If you can't serve a page from the machine, then you won't be able to use a database remotely. The logical steps would be something like - verify connectivity - verify db-server is running - verify local connectivity - verify remote connectivity If your PC is "at home", chances are your router has it's own firewall. Check the manual to verify - the router-setup varies per product. I changed something called "NAT", pointing from the outside to the static IP on the inside-network. (The numbers inside the network should be different from those outside, and you'd be using the outside-number to connect)
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
Hallo, I cannot connect to MySQL database from PC outside home network. I created client aplication in c++ to editing data in MySQL database. We have 2 PC at home. Both PC has the same TCP/IP address like xxx.xx.xx.xx. PC with MySQL server has IPv4 address 10.10.11.93. I tried to type xxx.xx.xx.xx/10.10.11.93 but error is occurred: 2005: unknown MySQL server host "xxx.xx.xx.xx/10.10.11.93" ( 11004). I can connect to the database from second PC at home wrighting the name of PC with MySQL server. What I have to write to connect from outside? Thanks.
1.fcb1913 wrote:
server has IPv4 address 10.10.11.93. I
That is a private IP address. It is NOT possible to address a private IP address on the internet. There is absolutely no way to do it. Your options are - Figure out your public IP address, which your ISP has given you. There is NO guarantee that you have a public IP address. However if you have one then your cable modem would be the one that has it. You would need to set up your modem to redirect requests to your box. - Buy a public IP from your ISP. Then do the above.
-
Hallo, I cannot connect to MySQL database from PC outside home network. I created client aplication in c++ to editing data in MySQL database. We have 2 PC at home. Both PC has the same TCP/IP address like xxx.xx.xx.xx. PC with MySQL server has IPv4 address 10.10.11.93. I tried to type xxx.xx.xx.xx/10.10.11.93 but error is occurred: 2005: unknown MySQL server host "xxx.xx.xx.xx/10.10.11.93" ( 11004). I can connect to the database from second PC at home wrighting the name of PC with MySQL server. What I have to write to connect from outside? Thanks.
Depending on the hardware for connecting your local intranet to the internet, it may be possible to set-up a "port forwarding": that means, you send the request to your public ip address with a port specified, and the router then forwards the request to an internal computer and that port. To get your public ip address, you can use tools like dyndns.
-
1.fcb1913 wrote:
server has IPv4 address 10.10.11.93. I
That is a private IP address. It is NOT possible to address a private IP address on the internet. There is absolutely no way to do it. Your options are - Figure out your public IP address, which your ISP has given you. There is NO guarantee that you have a public IP address. However if you have one then your cable modem would be the one that has it. You would need to set up your modem to redirect requests to your box. - Buy a public IP from your ISP. Then do the above.
Thanks. I have public IP address. On a chimney we have white cubic transmitter-receiver and one cable ended with a switch from witch the computers are connected. I don't know if it is router or modem. I tried typed my public IP address, IPv4 address, gate IPv4 and server DNS IPv4 address into web browser to set up connection, but always connect error is occured. I have contacted my internet provider, I hope he'll resolve this.
-
Depending on the hardware for connecting your local intranet to the internet, it may be possible to set-up a "port forwarding": that means, you send the request to your public ip address with a port specified, and the router then forwards the request to an internal computer and that port. To get your public ip address, you can use tools like dyndns.
Yes, port forwarding and using a dyndns tool should be able to work.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
-
Thanks. I have public IP address. On a chimney we have white cubic transmitter-receiver and one cable ended with a switch from witch the computers are connected. I don't know if it is router or modem. I tried typed my public IP address, IPv4 address, gate IPv4 and server DNS IPv4 address into web browser to set up connection, but always connect error is occured. I have contacted my internet provider, I hope he'll resolve this.
Have you tried using port forwarding as Bernhard has suggested?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus