MySQL中查询哪些存储代码中写了IP地址

2022-04-13 18:13:06 浏览数 (1)

使用正则表达式实现:

代码语言:javascript复制
select * from information_schema.routines 
 where routine_definition regexp '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$';

select * from information_schema.triggers 
 where action_statement regexp '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$';

select * from information_schema.events 
 where event_definition regexp '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$';

0 人点赞