How to list the allowed ip that can login mysql?

Viewed 9658

I know use the bellow commands, can allow a remote ip to login MySQL:

GRANT select,insert,update,delete ON *.* TO root@"my_ip" IDENTIFIED BY "my_password";
FLUSH PRIVILEGES;

But how can I list the allowed IPs that can login the MySQL?

1 Answers
SELECT User, Host FROM mysql.user; 

Will show you all users, and their allowed IP (ranges) in column host.

User Host
user_LAN_3 192.168.1.3
user_DMZ_4 192.168.2.4
user_DMZ_ALL 192.68.2.%
user_LAN_DMZ_ALL 192.168.%
please_dont_do_that %
local_web_app localhost
mysql.infoschema localhost
mysql.session localhost
mysql.sys localhost
root localhost
sysadmin localhost
Related