Reputation: 22899
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?
Upvotes: 2
Views: 4722
Reputation: 4237
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.
Upvotes: 2
Reputation: 3907
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.
Upvotes: 0
Reputation: 6976
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...
Upvotes: 0
Reputation: 8178
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)
Upvotes: 0