How to limit IPs that can connect remotely to mysql?

1

I have a centos 7 server with MySQL 5.6 installed, I can control the privileges of each user / host with GRANT.
But my question is how to allow only a few IPs to connect to the bank. connect, but only those with some privilege do something.
Any suggestions?

    
asked by anonymous 26.07.2017 / 17:27

2 answers

1

You need to make REVOKE, see more details on the link: link

REVOKE ALL PRIVILEGES ON test.* FROM 'jane'@'56.44.3.24';

    
26.07.2017 / 19:15
0

I was able to resolve by deleting the row of the mysql.user table where the host = '%' and the user = 'user'.
I do not know if this is the best way, but it worked, now it only connects users / hosts which has some privilege.

    
27.07.2017 / 15:16