0

I have a mysql database at my web hosting service, which I would like to access from a C# application on my local computer.

Due to account restrictions, I can't enable remote connections on the database server.

I would like some suggestions on how to execute CRUD operations on the database remotely i.e. from my localhost or any other place which is not on the server itself. The first idea that popped in to my head was to create a PHP REST API on the server and let it do the database work.

Is that the way to go? If so, is there anything similar created already, or do I need to make it from scratch? Perhaps you have other ideas?

Johan
  • 35,120
  • 54
  • 178
  • 293
  • well there are always direct connect sql services and make no changes whatsoever. Certainly a security concern. There are SSH tunnels too. Depends what you are really doing. But in general, REST api is the way. – Drew Nov 29 '15 at 00:24
  • Are you open to trying a different language? http://python-eve.org/ is popular in the Python community. The most popular SQL backend is SQLAlchemy. There's an eve plugin for that: https://github.com/nicolaiarocci/eve-sqlalchemy – slushy Nov 29 '15 at 00:27
  • @slushy Thanks for the tip, but I'm limited to PHP as well due to the hosting service. – Johan Nov 29 '15 at 00:30
  • some hosts allow tunnels. It all depends on the details, such as just for a handful of you, or a rollout to strangers. For what it's worth see http://stackoverflow.com/a/31909044 Ignore the focus on OpenShift. The point is that you may be able to get through to your host. In that guy's case, I pulled him off OpenShift – Drew Nov 29 '15 at 00:33
  • 1
    @Drew Thanks, looking in to it now... – Johan Nov 29 '15 at 00:35
  • 1
    Yes, I created something like that, for exactly that purpose, see: https://github.com/mevdschee/php-crud-api – mevdschee Dec 02 '15 at 23:38

0 Answers0