I’m using MySQL and a web-service connect to the database to read some values.
The web-service and the database are on the same server.
I want to deny access to the database through the public static IP of the server and the port of MySQL.
That means only allow access to the database through localhost, so that only the web-service can connect to it, How to do so ? What configuration for example in MySQL should i do ?
I’m using MySQL and a web-service connect to the database to read some values.
Share
It’s not possible to restrict access to mySQL to specific applications as such.
You can, however, create a user account (e.g. named
webservice) that is restricted to connect from127.0.0.1– that’s the best you can do as far as I know, and should be totally sufficient.