2

I'm creating a program which requires me to access my online MySQL database from a local computer.

In my cpanel there is a section that says 'Remote Database Access Hosts' would I add the local computers IP address in this situation? Will that remain constant, over years time, if its the same computer every time?

enter image description here

1
  • Bigger question... will it be even remotely secure? Unless using SSL/SSH I presume you'll be sending the account name and password plain-text i.e. 'in the clear'...? Commented Jun 7, 2012 at 4:39

4 Answers 4

2

If you're trying to access it from a "local" computer meaning another computer on your intranet, then find the intranet ip for that computer. Typically it will be 192.168.1.101 or 101 maybe 102, 103, 104, etc. So, if your router assigns IPs to the 192.168.1.* domain, you can add 192.168.1.% to that list and all computers on you intranet will be able to access the MySQL database.

Note: some routers you might need to add 192.168.10.% or 10.0.0.%, it just depends on how your router assigns internal IPs.

If you're using windows, you can open a command prompt (go to run->"cmd") and type "ipconfig"

Use the first three numbers from the Default Gateway and replace the last with a % sign. example ipconfig run

Sign up to request clarification or add additional context in comments.

2 Comments

Would the Deafault Gatewaybe the one labeled `Ethernet adapter Local Area Connection'? I have several sets of IP addresses come up.
Under 'Ethernet adapter Local Area Connection:' there should be a "Default Gateway....." line.
0

Probably an IP address that you'll have to obtain. We use both, something like 167.155.126.86 or mysql.ourdomain.com (which works when we roll over to our failsafe sites when the main ones are under maintenance)

Comments

0

Will that remain constant, over years time, if its the same computer every time?

It's not up to the computer, it's up to the IP-Address. If you don't have a static IP-Address, you may be in trouble in the next 24 hours (ISPs tend to do that on 24h basis).
You may want to have a look at services similar to DynDNS, No-IP, FreeDNS or similar.
I just realised that DynDNS is sadly no longer for free...

Comments

0

Go in to Remote database host. Enter the value %.% within the host input box and Add. Now that connection will be available to connect from any site and from localhost too.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.