accessing mysql remote database from local computer
Anonymous# October 30, 2013 at 2:30 pm
Im trying to create an admin panel for my website and the admin panel will upload new data to the mysql database. Is it possible and secure to keep my admin panel in my local computer and access the database that is in mysql hosting provider? so my admin panel will only be accessible with my computer .# October 30, 2013 at 2:48 pm
This will depend on your host, and what they allow. The most obvious solution would be to use something like phpMyAdmin – almost all hosting providers (IME, that offer MySQL at all) have something like this set up by default.
The next option would be to SSH to your database server and use the MySQL command line interface. If you literally want your DB to be accessible “only” from your computer, this is what you would need. Adding a GUI on top of this would be more complex, though, and more dependent on what your host wants to allow/accommodate.
= = = = = edit = = = = =
I think I misunderstood your question. Are you looking to create a web-based admin panel, but only have it on your local version of the site (and not on the “live” site)? If so, yes, that should work just fine.Anonymous# October 30, 2013 at 4:34 pm
Yes that is what i meant. i will need something like xampp to run php on my computer right?Anonymous# October 31, 2013 at 4:28 pm
So i am able to access any remote mysql database as long as i know the password, host, and username? i thought only files that are in the domain can access the domain database.Anonymous# November 1, 2013 at 8:36 am
Set privileges? wouldn’t i just need to log in normally in my php file like this?
what privileges do i need to set?
$connect = mysql_connect("host", "username", "password");# November 1, 2013 at 1:36 pm
It would depend on the database user/ database host. For example, some hosts restrict how you can connect to your DB from computers other than your website server; or give you a different user (with different privileges) for such access. Or, you might have no problems/restrictions at all. Have you tried yet?
You must be logged in to reply to this topic.