MYSQL access by an application

0

I am creating an application in C # this, it connects to a remote MySQL server, I have enabled for any IP to have access to my DB with a read-only user.

My question is: Is there a way in the WebService to authenticate the user in a way that I do not have to leave my DB with remote access turned on for all the ips and only localhost?

(it accesses a page that if log returns a token of the type)

    
asked by anonymous 03.06.2016 / 04:12

1 answer

0

As I understand your question, you want your Web Service to access the database, but you do not want to leave this access available off the server.

If this is the case, your Web Service should be hosted on the same server as well, so the connection could be localhost.

Now if you want to leave the remote access only released for this Web Service, I believe you would have to restrict the IP connection and your Web Service have Fixed IP.

    
13.09.2016 / 22:10