linux 防火墙或mysql数据库限制ip白名单
数据库白名单
select host,user from mysql.user;
mysql> set password=password('自己密码');
mysql> flush privileges;
grant all privileges on *.* to 'root'@'22.22.22.22' identified by '自己密码' with grant option;
grant all privileges on *.* to 'root'@'11.11.11.11' identified by '自己密码' with grant option;
连接不上请参考该文档,打印日志
https://blog.csdn.net/m0_67402125/article/details/123786820?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-123786820-blog-44306869.235^v39^pc_relevant_yljh&spm=1001.2101.3001.4242.1&utm_relevant_index=1
防火墙白名单