How to limit Ips that can remotely connect to mysql?

Asked

Viewed 141 times

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.
Currently any IP can connect, but only those who have some privilege run something.
Any suggestions?

  • that would be useful https://unix.stackexchange.com/questions/159873/whitelist-source-addresses-in-centos-7

2 answers

1

  • Yes, I have tried with REVOKE, but the connection is still allowed.

0

I was able to solve by deleting the row from the mysql.user table where the host='%' and the user='user'.
I don’t know if it’s the best way, but it worked, now only connect users/hosts who have some privilege.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.